Results for “strict”
Small, practical examples. Search by task or narrow things down below.
Display a number with a fixed decimal width
TypeScript: toFixed returns a formatted string rather than a numeric value.
TypeScript✓ Tested
Display a specific reactive validation error
Display a specific reactive validation error with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Display untrusted-looking text without HTML execution
Display untrusted-looking text without HTML execution with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Distinguish an own property from an inherited one
TypeScript: Object.hasOwn avoids depending on an object’s possibly shadowed hasOwnProperty method.
TypeScript✓ Tested
Divide using a fractional number
TypeScript: Use a floating-point operand to preserve the fractional part of a division.
TypeScript✓ Tested
Drop the fractional part toward zero
TypeScript: Math.trunc differs from floor for negative inputs.
TypeScript✓ Tested
Emit a typed object from a child
Emit a typed object from a child with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Enable saving only after a field changes
Enable saving only after a field changes with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Explain a calculation with a comment
TypeScript: Keep the code executable while documenting why a fixed input is used.
TypeScript✓ Tested
Expose a disclosure’s expanded state
Expose a disclosure’s expanded state with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Expose a read-only signal view
Expose a read-only signal view with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Expose a required field’s validity
Expose a required field’s validity with a standalone Angular component and explicit browser behavior.
Angular✓ Tested