Skip to content

NodeDataProperties

NodeDataProperties<T> = MakePropertiesOptional<ExtractProperties<T>>

Derives a TypeScript type for a node’s data.properties directly from its NodeSchema. Each property is optional (matching the runtime, where partial form-state is normal).

T

const schema = { type: 'object', properties: { count: { type: 'number' } } } as const;
type Props = NodeDataProperties<typeof schema>; // { count?: number }