type-alias / @typed/ui/Collection

State

Complete renderer-independent state for Collection.

Learn this UI primitive →

Package version
1.0.0-beta.13
Category
Collection state
Since
1.0.0

Import

import type { State } from "@typed/ui/Collection";

Signatures

export type State<Value = unknown, Element extends object = globalThis.Element> = readonly Item<Value, Element>[];

Why

Applications can inspect, update, and test Collection behavior without mounting or coupling the state to a renderer.

Ownership and lifetime

This declaration is data or schema metadata and acquires no resources.

Example

Import with import type { State } from "@typed/ui/Collection"; Extend the Collection.makeState runnable setup. Collection state is an immutable sequence: const snapshot: State<string> = [{ id: "save", value: "save" }].

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source