@mitcsutt/kiln-forms
Version:
Kiln forms: typed React forms on TanStack Form, in component or JSON schema mode, rendered through kiln-ui
11 lines (10 loc) • 601 B
TypeScript
import type { CustomNodeComponent, CustomNodeProps } from '../../kit/types.js';
import type { JsonObject } from '../core/types.js';
/**
* A schema custom node: `{ custom: key, props }` renders this component with
* `{ form, props, node }`. Register it with `kit.extend({ nodes: { key: … } })`; the node's JSON
* `props` are then typed from `P`. Identity at runtime.
*
* @privateRemarks Design reference §10.5.
*/
export declare function defineCustomNode<P extends JsonObject = JsonObject>(component: (props: CustomNodeProps<P>) => ReturnType<CustomNodeComponent<P>>): CustomNodeComponent<P>;