interface / @typed/ui/Composite

TypeaheadBuffer

Public Composite.TypeaheadBuffer behavioral model.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
Typeahead
Since
1.0.0

Import

import { TypeaheadBuffer } from "@typed/ui/Composite";

Signatures

export interface TypeaheadBuffer {
    readonly value: string;
    readonly updatedAt: number;
}

Why

The public model lets custom composites reuse Composite’s deterministic policy without copying an internal shape.

Ownership and lifetime

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

Example

Import with import type { TypeaheadBuffer } from "@typed/ui/Composite"; Extend the Composite.makeState runnable setup. Retain the exact typed query and timestamp with const buffer: TypeaheadBuffer = { value: "Ty", updatedAt: 100 }.

Property: updatedAt

Timestamp of the last typeahead key, used to decide whether to append or restart.

Property: value

Buffered typeahead key sequence, preserving the supplied key case.

Other public imports

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

Source