Skip to main content

InsertableTypedNode TypeAlias

Data which can be used as a node to be inserted. Either an unhydrated node, or content to build a new node.

Signature

export type InsertableTypedNode<TSchema extends TreeNodeSchema, T = UnionToIntersection<TSchema>> = (T extends TreeNodeSchema<string, NodeKind, TreeNode | TreeLeafValue, never, true> ? NodeBuilderData<T> : never) | (T extends TreeNodeSchema ? Unhydrated<TreeNode extends NodeFromSchema<T> ? never : NodeFromSchema<T>> : never);

Type Parameters

Parameter Constraint Default Description
TSchema TreeNodeSchema
T UnionToIntersection<TSchema> Do not specify: default value used as implementation detail.

See Also

Input