Skip to main content

UnwrapPropTreeNode TypeAlias

Casts a node from a PropTreeNode back to a TreeNode.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/react/alpha.

For more information about our API support guarantees, see here.

Signature

export type UnwrapPropTreeNode<T extends TreeLeafValue | PropTreeNode<TreeNode> | undefined> = T extends PropTreeNode<infer Node> ? Node : T;

Type Parameters

ParameterConstraintDescription
TTreeLeafValue | PropTreeNode<TreeNode> | undefined

Remarks

This should only be done in scenarios where tracking observations is not required (such as event handlers), or when taking care to handle invalidation manually.