UNPKG

@mitcsutt/kiln-forms

Version:

Kiln forms: typed React forms on TanStack Form, in component or JSON schema mode, rendered through kiln-ui

12 lines (11 loc) • 611 B
import type { EmptyObject } from '../../kit/types.js'; import type { FormSchema } from './types.js'; /** * `defineSchemaFor<R, X>()` → a `defineFormSchema` bound to a kit's registries (the kit * exposes it as `kit.defineFormSchema`). Curried and non-generic in the schema parameter so object * literals get excess-property checks: `define<Entry, Ctx>()({ version: 1, root: … })`. * Identity at runtime. * * @privateRemarks Design reference §10.1. */ export declare function defineSchemaFor<R, X = EmptyObject>(): <T, C = EmptyObject>() => (schema: FormSchema<T, R, X, C>) => FormSchema<T, R, X, C>;