FIND YOUR NEXT FEW LINES

Results for “strict”

Small, practical examples. Search by task or narrow things down below.

268 snippets foundClear filters
TypeScriptArray restructuring

Generate a bounded integer range

TypeScript: Array.from supplies each output position to its mapping function.

TypeScript✓ Tested
TypeScriptTypes & functions

Give an optional property a default

Handle missing object fields with nullish coalescing.

optional✓ Tested
TypeScriptObject behavior & collections

Group records into map entries

TypeScript: Initialize an array for a missing Map key before appending its values.

TypeScript✓ Tested
AngularAccessibility & reusable patterns

Group related controls with a fieldset and legend

Group related controls with a fieldset and legend with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularReactive forms

Group related typed controls

Group related typed controls with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularGetting Started

Handle a button click

Handle a button click with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
TypeScriptSafe data handling

Handle a result with a discriminated union

Separate success data from an error message.

discriminated union✓ Tested
AngularTemplate-driven forms

Handle a template-driven form submission

Handle a template-driven form submission with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularGetting Started

Handle an event emitted by a child

Handle an event emitted by a child with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularServices & dependency injection

Handle an optional dependency

Handle an optional dependency with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularEvents & DOM interaction

Handle Escape to dismiss a panel

Handle Escape to dismiss a panel with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularEvents & DOM interaction

Handle the Enter key specifically

Handle the Enter key specifically with a standalone Angular component and explicit browser behavior.

Angular✓ Tested