Skip to main content

VerboseTreeNode Interface

Verbose encoding of a TreeNode.

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

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

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

Signature​

export interface VerboseTreeNode<THandle = IFluidHandle>

Type Parameters​

ParameterDefaultDescription
THandleIFluidHandle

Remarks​

This is verbose meaning that every TreeNode has an explicit type property, and fields. This allowed VerboseTreeNode to be unambiguous regarding which type each node is without relying on symbols or hidden state.

Any IFluidHandle values have been replaced by THandle. If the THandle is JSON compatible, then this type is JSON compatible as well.

Properties​

PropertyAlertsTypeDescription
fieldsAlphaVerboseTree<THandle>[] | { [key: string]: VerboseTree<THandle>; }Content of this node. For array nodes, an array of children. For map and object nodes, an object which children under keys.
typeAlphastringThe meaning of this node. Provides contexts/semantics for this node and its content.

Property Details​

fields​

Content of this node. For array nodes, an array of children. For map and object nodes, an object which children under keys.

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

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

Signature​

fields: VerboseTree<THandle>[] | {
[key: string]: VerboseTree<THandle>;
};

Type: VerboseTree<THandle>[] | { [key: string]: VerboseTree<THandle>; }

Remarks​

For object nodes, the keys could be either the stored keys, or the property keys depending on usage.

type​

The meaning of this node. Provides contexts/semantics for this node and its content.

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

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

Signature​

type: string;

Type: string

Remarks​

Typically used to associate a node with metadata (including a schema) and source code (types, behaviors, etc). When used with this package's schema system, it will be the identifier.