FIND YOUR NEXT FEW LINES

Results for “then”

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

703 snippets foundClear filters
TypeScriptCollections & records

Type a dictionary with Record

Limit a lookup table to a known set of keys.

Record✓ Tested
TypeScriptTypes & functions

Type a function’s inputs and output

Catch mismatched arguments during compilation.

function✓ Tested
TypeScriptUtilities & async

Type an object update with Partial

Allow a caller to provide just the fields to change.

Partial✓ Tested
C++Containers & compound values

Unpack a tuple with structured bindings

C++: Structured bindings give names to the parts of a returned compound value.

C++✓ Tested
TypeScriptGetting Started

Update a running count

TypeScript: Change a variable after its initial value has been assigned.

TypeScript✓ Tested
C++Getting Started

Update a running count

C++: Change a variable after its initial value has been assigned.

C++✓ Tested
CGetting Started

Update a running count

C: Change a variable after its initial value has been assigned.

C✓ Tested
AngularSignals & state

Update a signal from its previous value

Update a signal from its previous value with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
RustThreads & shared ownership

Update an atomic counter

Update an atomic counter in a complete Rust program using the standard library.

Rust✓ Tested
RustMaps & sets

Update an existing map value

Update an existing map value in a complete Rust program using the standard library.

Rust✓ Tested
RustGetting Started

Update an explicitly mutable variable

Update an explicitly mutable variable in a complete Rust program using the standard library.

Rust✓ Tested
TypeScriptSafe data handling

Update an object with a readonly input

Create a changed copy while retaining the original.

readonly✓ Tested