type-alias / @typed/ui

Form.FormState

Hydrated RefSubject carrying form state plus runtime schema metadata.

Learn this UI primitive →

Package version
1.0.0-beta.7
Category
State models
Since
1.0.0
Member of
Form

Import

import { Form } from "@typed/ui";

Access Form.FormState through the imported Form 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 FormState<Values extends object> = RefSubject.HydratedRefSubject<State<Values>, Schema.SchemaError> & {
    readonly id: string;
    readonly codec: Schema.Codec<Values, unknown>;
    readonly fields: Readonly<Record<keyof Values & string, Schema.Codec<any, any>>>;
};

Property: codec

Runtime-only validation codec; it is deliberately absent from hydration state.

Property: fields

Runtime field codecs used for field-level validation.

Property: id

Runtime identity used to scope field/error relationships. Pass an id for deterministic SSR.

Other public imports

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

Source