Results for “STRICT”
Small, practical examples. Search by task or narrow things down below.
Handle three possible outcomes
TypeScript: Check high, normal and low values with an ordered conditional chain.
TypeScript✓ Tested
Hide an element while keeping it mounted
Hide an element while keeping it mounted with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Initialize component data with ngOnInit
Initialize component data with ngOnInit with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Inject a service into a component
Inject a service into a component with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Inspect both successful and failed promise results
TypeScript: allSettled preserves input order and reports failures without rejecting the combined promise.
TypeScript✓ Tested
Inspect deleted rows
Return values from the rows a DELETE removes.
DELETE✓ Tested
Inspect structured data with JsonPipe
Inspect structured data with JsonPipe with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Inspect the parsed pieces of a URL
TypeScript: Use URL properties rather than splitting a URL at punctuation.
TypeScript✓ Tested
Iterate with array indices and values
TypeScript: entries provides each position and value without a separate counter.
TypeScript✓ Tested
Keep a secondary button from submitting a form
Keep a secondary button from submitting a form with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Keep both matching and rejected values
TypeScript: Use two explicit outputs when a caller needs both sides of a classification.
TypeScript✓ Tested
List an object’s own enumerable keys
TypeScript: Object.keys omits inherited and non-enumerable properties.
TypeScript✓ Tested