Packages > @fluidframework/tree >


A TreeNode which modules a JavaScript object.


export type TreeObjectNode<T extends RestrictiveReadonlyRecord<string, ImplicitFieldSchema>, TypeName extends string = string> = TreeNode & ObjectFromSchemaRecord<T> & WithType<TypeName>;

Type Parameters

Parameter Constraint Default Description
T RestrictiveReadonlyRecord<string, ImplicitFieldSchema>
TypeName string string


Object nodes consist of a type which specifies which TreeNodeSchema they use (see schema(node) ), and a collections of fields, each with a distinct key and its own FieldSchema defining what can be placed under that key.

All fields on an object node are exposed as own properties with string keys. Non-empty fields are enumerable and empty optional fields are non-enumerable own properties with the value undefined. No other own own or enumerable properties are included on object nodes unless the user of the node manually adds custom session only state. This allows a majority of general purpose JavaScript object processing operations (like, Reflect.ownKeys() and Object.entries()) to enumerate all the children.