type-alias / @typed/ui/index

Collection.State

Complete renderer-independent state for Collection.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
Collection state
Since
1.0.0
Member of
Collection

Import

import { Collection } from "@typed/ui/index";

Access Collection.State through the imported Collection export. Its declaration below describes the member.

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

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