@fluidframework/tree Package
Interfaces
| Interface | Alerts | Modifiers | Description |
|---|---|---|---|
| AllowedTypeMetadata | Beta | Annotations that apply to an individual allowed type. | |
| AllowedTypesMetadata | Beta | Annotations that apply to a set of allowed types. | |
| AnnotatedAllowedType | Beta | sealed | Stores annotations for an individual allowed type. |
| AnnotatedAllowedTypes | Beta | sealed | Stores annotations for a set of allowed types. |
| AnnotatedAllowedTypesUnsafe | System | sealed | Unenforced version of AnnotatedAllowedTypes. |
| AnnotatedAllowedTypeUnsafe | System | sealed | Unenforced version of AnnotatedAllowedType. |
| ArrayNodeCustomizableSchema | System | sealed | A schema for customizable TreeArrayNodes. |
| ArrayNodeCustomizableSchemaUnsafe | System | sealed | Unenforced version of ArrayNodeCustomizableSchemas. |
| ArrayNodePojoEmulationSchema | System | sealed | A schema for POJO emulation mode TreeArrayNodes. |
| ArrayPlaceAnchor | Alpha | sealed | A location in a TreeArrayNode. |
| BranchableTree | Alpha | sealed | A "version control"-style branch of a SharedTree. |
| CodecWriteOptions | Alpha | Options relating to encoding of persisted data. | |
| CodecWriteOptionsBeta | Beta | Options relating to encoding of persisted data. | |
| CommitMetadata | sealed | Information about a commit that has been applied. | |
| DirtyTreeMap | Alpha | A map-like interface for tracking the status of nodes that have been tracked for changes. | |
| FieldProps | Additional information to provide to a FieldSchema. | ||
| FieldPropsAlpha | Alpha | FieldProps extended with additional alpha options. | |
| FieldSchemaAlphaUnsafe | System | sealed | Unenforced version of FieldSchemaAlpha. |
| FieldSchemaMetadata | sealed | Metadata associated with a FieldSchema. | |
| ForestOptions | Beta | Configuration options for SharedTree's internal tree storage. | |
| ForestType | Beta | sealed | Used to distinguish between different forest types. |
| FormatValidator | Alpha | sealed | A kind of validator for SharedTree's internal data formats. |
| ICodecOptions | Alpha | Options relating to handling of persisted data. | |
| IndependentViewOptions | Alpha | independentView(config, options) options. | |
| InternalTreeNode | sealed | A node type internal to @fluidframework/tree. | |
| ITree | sealed | Channel for a Fluid Tree DDS. | |
| ITreeAlpha | Alpha | sealed | ITree extended with some alpha APIs. |
| ITreeConfigurationOptions | Options when constructing a tree view. | ||
| ITreeViewConfiguration | Property-bag configuration for TreeViewConfiguration construction. | ||
| JsonArrayNodeSchema | Alpha | sealed | JSON Schema for an array node. |
| JsonLeafNodeSchema | Alpha | sealed | JSON Schema for a leaf node. |
| JsonMapNodeSchema | Alpha | sealed | JSON Schema for a map node. |
| JsonNodeSchemaBase | Alpha | sealed | Base interface for node schemas represented in JSON Schema format. |
| JsonObjectNodeSchema | Alpha | sealed | JSON Schema for an object node. |
| JsonRecordNodeSchema | Alpha | sealed | JSON Schema for a record node. |
| JsonSchemaRef | Alpha | sealed | Type entry containing a reference to a definition in the schema. |
| JsonStringKeyPatternProperties | Alpha | sealed | Types allowed in map / record nodes. |
| LabelTree | Alpha | sealed | A tree representing the nesting structure of transaction labels. |
| LeafSchema | System | sealed | A TreeNodeSchema for a TreeLeafValue. |
| LocalChangeMetadata | Alpha | sealed | Information about a change that has been applied by the local client. |
| MakeNominal | sealed | Use this as the type of a protected field to cause a type to use nominal typing instead of structural. | |
| MapNodeCustomizableSchema | System | sealed | A schema for customizable TreeMapNodes. |
| MapNodeCustomizableSchemaUnsafe | System | sealed | Unenforced version of MapNodeCustomizableSchemas. |
| MapNodePojoEmulationSchema | System | sealed | A schema for POJO emulation mode TreeMapNodes. |
| NoChangeConstraint | Alpha | A constraint which requires that, for this transaction to apply, the document must be in the same state immediately before the transaction is applied as it was before the transaction was authored. When used as a revert precondition it requires that, for the revert to apply, the document must be in the same state immediately before the revert is applied as it was after the transaction was applied. | |
| NodeChangedData | Beta | sealed | Data included for nodeChanged. |
| NodeInDocumentConstraint | A transaction constraint which requires that the given node exists in the tree. | ||
| NodeSchemaMetadata | sealed | Metadata associated with a Node Schema. | |
| NodeSchemaOptions | Additional information to provide to Node Schema creation. | ||
| NodeSchemaOptionsAlpha | Alpha | Additional information to provide to Node Schema creation. Includes fields for alpha features. | |
| ObjectNodeSchema | Alpha | sealed | A schema for TreeObjectNodes. |
| ObjectSchemaOptions | Beta | Options when declaring an object node's schema. | |
| ObjectSchemaOptionsAlpha | Alpha | Options when declaring an object node's schema | |
| ObservationResults | Alpha | sealed | Results from an operation with tracked observations. |
| ReadonlyArrayNode | System | sealed | A covariant base type for TreeArrayNode. This provides the readonly subset of TreeArrayNode functionality, and is used as the source interface for moves since that needs to be covariant. |
| RecordNodeCustomizableSchema | System | sealed | A schema for customizable TreeMapNodes. |
| RecordNodePojoEmulationSchema | System | sealed | A schema for POJO emulation mode TreeMapNodes. |
| RemoteChangeMetadata | Alpha | sealed | Information about a change that has been applied by a remote client. |
| Revertible | sealed | Allows reversion of a change made to SharedTree. | |
| RevertibleAlpha | Alpha | sealed | A Revertible with features that are not yet stable. |
| RunTransaction | sealed | A function which runs a transaction in a SharedTree. | |
| RunTransactionParams | Alpha | The parameters for the RunTransaction API. | |
| SchemaCompatibilityStatus | sealed | Information about a view schema's compatibility with the document's stored schema. See SharedTree's README for more information about choosing a compatibility policy. | |
| SchemaStatics | System | sealed | Stateless APIs exposed via SchemaFactory as both instance properties and as statics. |
| SchemaStaticsAlpha | System | sealed | Stateless APIs exposed via SchemaFactoryBeta as both instance properties and as statics. |
| SchemaStaticsBeta | System | sealed | Stateless APIs exposed via SchemaFactoryBeta as both instance properties and as statics. |
| SharedTreeFormatOptions | Alpha | Options for configuring the persisted format SharedTree uses. | |
| SharedTreeOptions | Alpha | Configuration options for SharedTree with alpha features. | |
| SimpleAllowedTypeAttributes | Alpha | sealed | Information about allowed types under a field. |
| SimpleArrayNodeSchema | Alpha | sealed | A SimpleNodeSchema for an array node. |
| SimpleFieldSchema | Alpha | sealed | A simple, shallow representation of a schema for a field. |
| SimpleLeafNodeSchema | Alpha | sealed | A SimpleNodeSchema for a leaf node. |
| SimpleMapNodeSchema | Alpha | sealed | A SimpleNodeSchema for a map node. |
| SimpleNodeSchemaBase | System | sealed | Base interface for TreeNodeSchema and SimpleNodeSchema types. Once simple schema is stable this doesn't have a reason to be kept @system, but it could be. |
| SimpleNodeSchemaBaseAlpha | System | sealed | A SimpleNodeSchema containing fields for alpha features. |
| SimpleObjectFieldSchema | Alpha | sealed | A SimpleFieldSchema for an SimpleObjectNodeSchema field. |
| SimpleObjectNodeSchema | Alpha | sealed | A SimpleNodeSchema for an object node. |
| SimpleRecordNodeSchema | Alpha | sealed | A SimpleNodeSchema for a map node. |
| SimpleTreeSchema | Alpha | sealed | A simplified representation of a schema for a tree. |
| SnapshotFileSystem | Beta | The file system methods required by snapshotSchemaCompatibility(options). | |
| SnapshotSchemaCompatibilityOptions | Beta | The options for snapshotSchemaCompatibility(options). | |
| TransactionResultFailed | Alpha | The result of a transaction that was rolled back. | |
| TransactionResultSuccess | Alpha | The result of a transaction that completed successfully. | |
| Tree | sealed | Provides various functions for interacting with TreeNodes. | |
| TreeAlpha | Alpha | sealed | Extensions to Tree and TreeBeta which are not yet stable. |
| TreeArrayNode | sealed | A TreeNode which implements 'readonly T[]' and the array mutation APIs. | |
| TreeBeta | Beta | sealed | Extensions to Tree which are not yet stable. |
| TreeBranch | Beta | sealed | A collection of functionality associated with a (version-control-style) branch of a SharedTree. |
| TreeBranchAlpha | Alpha | sealed | TreeBranch with alpha-level APIs. |
| TreeBranchEvents | Alpha | sealed | Events for TreeBranch. |
| TreeBranchFork | Alpha | sealed | A branch of a SharedTree that has merged from another branch. |
| TreeChangeEvents | sealed | A collection of events that can be emitted by a TreeNode. | |
| TreeChangeEventsBeta | Beta | sealed | Extensions to TreeChangeEvents which are not yet stable. |
| TreeContextAlpha | Alpha | Provides additional APIs that may be used to interact with a tree node or a tree node's SharedTree. | |
| TreeEncodingOptions | Beta | Options for how to interpret or encode a tree when schema information is available. | |
| TreeIdentifierUtils | Alpha | sealed | A utility interface for manipulating node identifiers. |
| TreeIndex | Alpha | sealed | An index allows lookup content from a tree using keys. |
| TreeMapNode | sealed | A map of string keys to tree objects. | |
| TreeNodeApi | sealed | Provides various functions for analyzing TreeNodes. | |
| TreeNodeSchemaCore | sealed | Data common to all tree node schema. | |
| TreeRecordNode | Beta | A TreeNode which models a TypeScript record. | |
| TreeRecordNodeUnsafe | System | sealed | Unenforced version of TreeRecordNode. |
| TreeSchema | Alpha | sealed | TreeViewConfigurationAlpha |
| TreeSchemaEncodingOptions | Alpha | Options for how to interpret or encode a tree when schema information is available. | |
| TreeView | sealed | An editable view of a (version control style) branch of a shared tree based on some schema. | |
| TreeViewAlpha | Alpha | sealed | TreeView with proposed changes to the schema aware typing to allow use with UnsafeUnknownSchema. |
| TreeViewBeta | Beta | sealed | TreeView with additional beta APIs. |
| TreeViewEvents | sealed | Events for TreeView. | |
| VerboseTreeNode | Alpha | Verbose encoding of a TreeNode. | |
| ViewableTree | System | sealed | A tree from which a TreeView can be created. |
| ViewContent | Alpha | The portion of SharedTree data typically persisted by the container. Usable with independentInitializedView(config, options, content) to create a TreeView without loading a container. | |
| WithType | sealed | Adds a type symbol to a type for stronger typing. | |
| WithValue | Alpha | Contains a value returned from a transaction. |
Classes
| Class | Alerts | Modifiers | Description |
|---|---|---|---|
| FieldSchema | sealed | All policy for a specific field, including functionality that does not have to be kept consistent across versions or deterministic. This can include policy for how to use this schema for "view" purposes, and well as how to expose editing APIs. Use SchemaFactory to create the FieldSchema instances, for example optional. | |
| FieldSchemaAlpha | Alpha | sealed | FieldSchema including alpha APIs (currently SimpleFieldSchema). |
| IterableTreeArrayContent | sealed | Used to insert iterable content into a TreeArrayNode. Use (TreeArrayNode:variable).spread to create an instance of this type. | |
| SchemaFactory | sealed | Creates various types of schema for TreeNodes. | |
| SchemaFactoryAlpha | Alpha | SchemaFactory with additional alpha APIs. | |
| SchemaFactoryBeta | Beta | SchemaFactory with additional beta APIs. | |
| SchemaUpgrade | Beta | sealed | Unique token used to upgrade schemas and determine if a particular upgrade has been completed. |
| TreeNode | sealed | A non-leaf SharedTree node. Includes objects, arrays, and maps. | |
| TreeViewConfiguration | sealed | Configuration for viewWith(config). | |
| TreeViewConfigurationAlpha | Alpha | sealed | TreeViewConfiguration extended with some alpha APIs. |
Enumerations
| Enum | Alerts | Description |
|---|---|---|
| CommitKind | The type of a commit. This is used to describe the context in which the commit was created. | |
| FieldKind | Kind of a field on an TreeObjectNode. | |
| KeyEncodingOptions | Beta | Options for how to encode keys in a tree. |
| NodeKind | Kind of tree node. | |
| RevertibleStatus | The status of a Revertible. | |
| SchemaType | Alpha | The type of simple schema being represented. |
| TreeCompressionStrategy | Alpha | Selects which heuristics to use when encoding tree content. All encoding options here are compatible with the same decoder: the selection here does not impact compatibility. |
| TreeStatus | Status of the tree that a particular node belongs to. | |
| ValueSchema | Alpha | Schema for what TreeLeafValue is allowed on a Leaf node. |
Types
| TypeAlias | Alerts | Modifiers | Description |
|---|---|---|---|
| AllowedTypes | System | Schema for types allowed in some location in a tree (like a field, map entry or array). | |
| AllowedTypesFull | Beta | sealed | Stores annotations for a set of allowed types. |
| AllowedTypesFullEvaluated | Beta | sealed | AllowedTypesFull but with the lazy schema references eagerly evaluated. |
| AllowedTypesFullFromMixed | System | sealed | Creates an AllowedTypesFull type from a mixed array of annotated and unannotated allowed types. |
| AllowedTypesFullFromMixedUnsafe | System | sealed | Unenforced version of AllowedTypesFullFromMixed. |
| AllowedTypesFullUnsafe | System | sealed | Unenforced version of AllowedTypesFull. |
| AnnotateAllowedTypesList | System | Add annotations to a list of allowed types that may or may not contain annotations. | |
| AnnotateAllowedTypesListUnsafe | System | sealed | Unenforced version of AnnotateAllowedTypesList. |
| ArrayNodeSchema | Alpha | A schema for TreeArrayNodes. | |
| ChangeMetadata | Alpha | sealed | Information about a local or remote change that has been applied. |
| CodecName | Alpha | A unique name given to this codec family. | |
| ConciseTree | Beta | Concise encoding of a TreeNode or TreeLeafValue. | |
| CreateIndependentTreeAlphaOptions | Alpha | createIndependentTreeAlpha(options) options. | |
| DirtyTreeStatus | Alpha | The status of a node in a that has been tracked for changes. | |
| ErasedNode | Alpha | The type of an erased schema's node. | |
| ErasedSchema | Alpha | The type of an erased schema. | |
| ErasedSchemaSubclassable | Alpha | The type of a subclassable erased schema. | |
| FactoryContent | System | Content which can be used to build a node. | |
| FactoryContentObject | System | Record-like object which can be used to build some kinds of nodes. | |
| FieldHasDefaultAlpha | System | Type utility for determining if an implicit field schema is known to have a default value. Supports alpha field schemas with explicit default providers. | |
| FieldHasDefaultAlphaUnsafe | System | sealed | Unenforced version of FieldHasDefaultAlpha. |
| FixRecursiveArraySchema | Beta | Workaround for fixing errors resulting from an issue with recursive ArrayNode schema exports. | |
| FormatVersion | Alpha | A version stamp for encoded data. | |
| HandleConverter | Alpha | Options for how to transcode handles. | |
| IdentifierIndex | Alpha | An index that returns tree nodes given their associated identifiers. | |
| ImplicitAllowedTypes | Types of TreeNodes or TreeLeafValues allowed at a location in a tree. | ||
| ImplicitFieldSchema | Schema for a field of a tree node. | ||
| IncrementalEncodingPolicy | Alpha | Policy type to determine whether one of more fields of a node in a schema should be incrementally encoded. | |
| Input | System | This type exists only to be linked from documentation to provide a single linkable place to document some details of "Input" types and how they handle schema. When a schema is used to describe data which is an input into an API, the API is contravariant over the schema. (See also TypeScript Variance Annotations). Since these schema are expressed using TypeScript types, it is possible for the user of the API to provide non-exact values of these types which has implications that depended on the variance. Consider a field with schema type of | |
| Insertable | Alpha | Content which could be inserted into a tree. | |
| InsertableContent | System | Content which can be inserted into a tree. | |
| InsertableField | Alpha | Content which could be inserted into a field within a tree. | |
| InsertableObjectFromSchemaRecordAlpha | System | Alpha version of InsertableObjectFromSchemaRecord that supports field defaults. | |
| InsertableObjectFromSchemaRecordAlphaUnsafe | System | Unenforced version of InsertableObjectFromSchemaRecordAlpha. | |
| InsertableTreeFieldFromImplicitField | Type of content that can be inserted into the tree for a field of the given schema. | ||
| InsertableTreeNodeFromAllowedTypes | System | Type of content that can be inserted into the tree for a node of the given schema. | |
| InsertableTreeNodeFromImplicitAllowedTypes | Type of content that can be inserted into the tree for a node of the given schema. | ||
| InsertableTypedNode | Data which can be used as a node to be inserted. Either an unhydrated node, or content to build a new node. | ||
| IsListener | Deprecated | true iff the given type is an acceptable shape for a event listener | |
| IsUnion | System | Returns true if T is a union and false if it is not. | |
| JsonCompatible | Beta | Use for Json compatible data. | |
| JsonCompatibleObject | Beta | Use for Json object compatible data. | |
| JsonCompatibleReadOnly | Alpha | Use for readonly view of Json compatible data. | |
| JsonCompatibleReadOnlyObject | Alpha | Use for readonly view of Json compatible data. | |
| JsonFieldSchema | Alpha | sealed | JSON Schema representation of a FieldSchema. |
| JsonLeafSchemaType | Alpha | JSON primitive types. | |
| JsonNodeSchema | Alpha | JSON Schema representation of a TreeNodeSchema. | |
| JsonRefPath | Alpha | Reference string pointing to a definition in the schema. Should be the fully-qualified identifier. | |
| JsonSchemaId | Alpha | The fully-qualified identifier. | |
| JsonSchemaType | Alpha | JSON entity type. | |
| JsonTreeSchema | Alpha | sealed | JSON Schema representation of a tree schema. |
| LazyItem | An "eager" or "lazy" Item in a FlexList. Lazy items are wrapped in a function to allow referring to themselves before they are declared. This makes recursive and co-recursive items possible. | ||
| Listenable | Deprecated | An object which allows the registration of listeners so that subscribers can be notified when an event happens. | |
| Listeners | Deprecated | Used to specify the kinds of events emitted by a Listenable. | |
| MapNodeInsertableData | System | Content which can be used to construct a Map node, explicitly or implicitly. | |
| MapNodeSchema | Alpha | A schema for TreeMapNodes. | |
| NodeFromSchema | Takes in TreeNodeSchema[] and returns a TypedNode union. | ||
| NodeProvider | Alpha | sealed | A provider for values in tree nodes. |
| NumberKeys | System | Extracts the keys of T which are numbers. | |
| ObjectFromSchemaRecord | System | Generates the properties for an ObjectNode from its field schema object. | |
| ObjectNodeSchemaWorkaround | Alpha | sealed | ObjectNodeSchema with a workaround to avoid a specific known TypeScript issue which causes it to not be assignable to itself in some cases. |
| Off | Deprecated | A function that, when called, will deregister an event listener subscription that was previously registered. | |
| PopUnion | System | Gets the first item of a union type. | |
| ReadableField | System | Content which could be read from a field within a tree. | |
| ReadSchema | System | Adapter to remove UnsafeUnknownSchema from a schema type so it can be used with types for generating APIs for reading data. | |
| RecordNodeInsertableData | System | Content which can be used to construct a Record node, explicitly or implicitly. | |
| RecordNodeSchema | Alpha | A schema for TreeRecordNodes. | |
| RestrictiveReadonlyRecord | Deprecated | Alternative to the built in Record type which does not permit unexpected members, and is readonly. | |
| RestrictiveStringRecord | System | Alternative to the built-in Record<string, T> type which is readonly and does not permit symbols. | |
| RevertibleAlphaFactory | Alpha | sealed | Factory for creating a RevertibleAlpha. |
| RevertibleFactory | sealed | Factory for creating a Revertible. | |
| SharedTreeOptionsBeta | Beta | Configuration options for SharedTree. | |
| SimpleNodeSchema | Alpha | A simple, shallow representation of a schema for a node. | |
| TransactionCallbackStatus | Alpha | Contains a value and status returned from a user-supplied transaction callback. | |
| TransactionConstraint | A requirement for a SharedTree transaction to succeed. | ||
| TransactionConstraintAlpha | Alpha | sealed | Type for alpha version constraints |
| TransactionLabels | Alpha | sealed | A set of transaction labels with an optional structural tree. |
| TransactionResult | Alpha | The result of the RunTransaction API. This is the same as TransactionResultExt but with the value field omitted. This is useful when the transaction callback doesn't need to return a value. | |
| TransactionResultExt | Alpha | The result of the RunTransaction API. | |
| TreeFieldFromImplicitField | Converts an ImplicitFieldSchema to a property type suitable for reading a field with this that schema. | ||
| TreeIndexKey | Alpha | Value that may be used as keys in a TreeIndex. | |
| TreeIndexNodes | Alpha | an array of nodes that is guaranteed to have at least one element | |
| TreeLeafValue | Value that may be stored as a leaf node. | ||
| TreeNodeFromImplicitAllowedTypes | Type of tree node for a field of the given schema. | ||
| TreeNodeSchema | sealed | Schema for a TreeNode or TreeLeafValue. | |
| TreeNodeSchemaClass | sealed | Tree node schema which is implemented using a class. | |
| TreeNodeSchemaNonClass | System | sealed | Schema which is not a class. |
| TreeObjectNode | A TreeNode which models a JavaScript object. | ||
| TreeParsingOptions | Alpha | Options for how to interpret a tree when schema information is available. | |
| UnannotateAllowedTypesList | System | Removes annotations from a list of allowed types that may contain annotations. | |
| UnannotateAllowedTypesListUnsafe | System | sealed | Unenforced version of UnannotateAllowedTypesList. |
| UnannotateAllowedTypeUnsafe | System | sealed | Unenforced utility to remove AnnotatedAllowedTypeUnsafe wrappers. |
| Unenforced | A placeholder to use in extends constraints when using the real type breaks compilation of some recursive types due to a design limitation of TypeScript. These extends constraints only serve as documentation: to avoid breaking compilation, this type has to not actually enforce anything, and thus is just | ||
| Unhydrated | Type alias to document which values are un-hydrated. Un-hydrated values are nodes produced from schema's create functions that haven't been inserted into a tree yet. Since un-hydrated nodes become hydrated when inserted, strong typing can't be used to distinguish them. This no-op wrapper is used instead. | ||
| UnionToIntersection | System | Convert a union of types to an intersection of those types. Useful for TransformEvents. | |
| UnionToTuple | System | Converts a union type to a tuple type. | |
| UnsafeUnknownSchema | Alpha | A special type which can be provided to some APIs as the schema type parameter when schema cannot easily be provided at compile time and an unsafe (instead of disabled) editing API is desired. | |
| ValidateRecursiveSchema | Compile time check for validity of a recursive schema. This type also serves as a central location for documenting the requirements and issues related to recursive schema. | ||
| ValidateRecursiveSchemaTemplate | System | Validation logic used by ValidateRecursiveSchema. | |
| VerboseTree | Alpha | Verbose encoding of a TreeNode or TreeLeafValue. | |
| VoidTransactionCallbackStatus | Alpha | The result of a transaction that doesn't return a value. |
Functions
| Function | Alerts | Return Type | Description |
|---|---|---|---|
| adaptEnum(factory, members) | Beta | (<TValue extends TEnum[keyof TEnum]>(value: TValue) => TValue extends unknown ? TreeNode & { readonly value: TValue; } : never) & { readonly [Property in keyof TEnum]: TreeNodeSchemaClass<ScopedSchemaName<TScope, TEnum[Property]>, NodeKind.Object, TreeNode & { readonly value: TEnum[Property]; }, Record<string, never>, true, Record<string, never>, undefined>; } & { readonly schema: UnionToTuple<{ readonly [Property in keyof TEnum]: TreeNodeSchemaClass<ScopedSchemaName<TScope, TEnum[Property]>, NodeKind.Object, TreeNode & { readonly value: TEnum[Property]; }, Record<string, never>, true, Record<string, never>, undefined>; }[keyof TEnum]>; } | Converts an enum into a collection of schema which can be used in a union. |
| allowUnused(t) | Alpha | void | Does nothing with the provided value, but appears to use it to make unused locals warnings and errors go away. |
| asAlpha(view) | Alpha | TreeViewAlpha<TSchema> | Retrieve the alpha API for a TreeView. |
| asAlpha(view) | Alpha | TreeViewConfigurationAlpha<TSchema> | Retrieve the alpha API for a TreeViewConfiguration. |
| asBeta(view) | Beta | TreeViewBeta<TSchema> | Retrieve the beta API for a TreeView. |
| asTreeViewAlpha(view) | Deprecated, Alpha | TreeViewAlpha<TSchema> | Retrieve the alpha API for a TreeView. |
| checkCompatibility(viewWhichCreatedStoredSchema, view) | Alpha | Omit<SchemaCompatibilityStatus, "canInitialize"> | Compute the compatibility of using view to view a tree who's stored schema could be derived from viewWhichCreatedStoredSchema via either initialize(content) or upgradeSchema(). |
| cloneWithReplacements(root, rootKey, replacer) | Alpha | unknown | Like JSON.stringify, but returns a clone instead of stringifying the result. |
| comparePersistedSchema(persisted, view, options) | Alpha | Omit<SchemaCompatibilityStatus, "canInitialize"> | Compares two schema extracted using extractPersistedSchema(schema, minVersionForCollab, includeStaged). Reports the same compatibility that compatibility would report if opening a document that used the persisted schema and provided view to viewWith(config). |
| configuredSharedTreeAlpha(options) | Alpha | SharedObjectKind<ITree> | configuredSharedTreeBeta(options) but including the alpha SharedTreeOptions. |
| configuredSharedTreeBeta(options) | Beta | SharedObjectKind<ITree> | SharedTree but allowing a non-default configuration. |
| configuredSharedTreeBetaLegacy(options) | Legacy | ISharedObjectKind<ITree> & SharedObjectKind<ITree> | configuredSharedTreeBeta(options) including the legacy ISharedObjectKind type. |
| createArrayInsertionAnchor(node, currentIndex) | Alpha | ArrayPlaceAnchor | Create an ArrayPlaceAnchor tracking an insertion point in the array which is currently at the provided index. |
| createIdentifierIndex(view) | Alpha | IdentifierIndex | Creates an IdentifierIndex for a given TreeView. |
| createIndependentTreeAlpha(options) | Alpha | ViewableTree & Pick<ITreeAlpha, "exportVerbose" | "exportSimpleSchema"> | Alpha extensions to createIndependentTreeBeta(options). |
| createIndependentTreeBeta(options) | Beta | ViewableTree | Create a ViewableTree that is not tied to any Fluid runtimes or services. |
| createTreeIndex(view, indexer, getValue, isKeyValid) | Alpha | TreeIndex<TKey, TValue> | Creates a TreeIndex with a specified indexer. |
| createTreeIndex(view, indexer, getValue, isKeyValid, indexableSchema) | Alpha | TreeIndex<TKey, TValue> | Creates a TreeIndex with a specified indexer. |
| createTreeIndex(view, indexer, getValue, isKeyValid) | Alpha | TreeIndex<TKey, TValue> | Creates a TreeIndex with a specified indexer. |
| createTreeIndex(view, indexer, getValue, isKeyValid, indexableSchema) | Alpha | TreeIndex<TKey, TValue> | Creates a TreeIndex with a specified indexer. |
| decodeSchemaCompatibilitySnapshot(encodedSchema, validator) | Alpha | SimpleTreeSchema | Decodes a JSON-compatible schema into a simple schema. |
| encodeSchemaCompatibilitySnapshot(simpleSchema) | Alpha | JsonCompatibleReadOnly | Encodes the compatibility impacting subset of simple schema (view or stored) into a serializable format. |
| enumFromStrings(factory, members) | Beta | (<TValue extends Members[number]>(value: TValue) => TValue extends unknown ? TreeNode & { readonly value: TValue; } : never) & { [Index in Extract<keyof Members, `${number}`> extends `${infer N extends number}` ? N : never as Members[Index]]: TreeNodeSchemaClass<ScopedSchemaName<TScope, Members[Index]>, NodeKind.Object, TreeNode & { readonly value: Members[Index]; }, Record<string, never>, true, Record<string, never>, undefined>; } & { readonly schema: UnionToTuple<Members[number] extends unknown ? { [Index in Extract<keyof Members, `${number}`> extends `${infer N extends number}` ? N : never as Members[Index]]: TreeNodeSchemaClass<ScopedSchemaName<TScope, Members[Index]>, NodeKind.Object, TreeNode & { readonly value: Members[Index]; }, Record<string, never>, true, Record<string, never>, undefined>; }[Members[number]] : never>; } | Converts an array of distinct strings into a collection of schema which can be used like an enum style union. |
| eraseSchemaDetails() | Alpha | <T extends ExtraSchemaProperties & TreeNodeSchema<string, NodeKind, TNode & TreeNode>>(schema: T) => ExtraSchemaProperties & TreeNodeSchema<T["identifier"], NodeKind, TNode & TreeNode & WithType<T["identifier"]>, never, false> | Type-erase details of a schema. |
| eraseSchemaDetailsSubclassable() | Alpha | <T extends ExtraSchemaProperties & TreeNodeSchemaClass<string, NodeKind, TNode & TreeNode>>(schema: T) => ExtraSchemaProperties & TreeNodeSchemaClass<T["identifier"], NodeKind, TNode & TreeNode & WithType<T["identifier"]>, never, false> | Like eraseSchemaDetails() but allows the returned schema to be subclassed. |
| evaluateLazySchema(value) | Alpha | T | Returns the schema referenced by the LazyItem. |
| exportCompatibilitySchemaSnapshot(config) | Alpha | JsonCompatibleReadOnly | Returns a JSON compatible representation of the tree schema for snapshot compatibility checking. Snapshots can be loaded by the same or newer package versions, but not necessarily older versions. |
| extractPersistedSchema(schema, minVersionForCollab, includeStaged) | Alpha | JsonCompatible | Dumps the "persisted" schema subset of the provided schema into a deterministic JSON-compatible, semi-human-readable format. |
| generateSchemaFromSimpleSchema(simple) | Alpha | TreeSchema | Create FieldSchema from a SimpleTreeSchema. |
| getBranch(tree) | Deprecated, Alpha | BranchableTree | Get a BranchableTree from a ITree. |
| getBranch(view) | Deprecated, Alpha | BranchableTree | Get a BranchableTree from a TreeView. |
| getJsonSchema(schema, options) | Alpha | JsonTreeSchema | Creates a JSON Schema representation of the provided TreeNodeSchema. |
| getSimpleSchema(schema) | Alpha | SimpleTreeSchema<SchemaType.View> | Copies data from ImplicitFieldSchema to create a SimpleTreeSchema out of new plain JavaScript objects, Sets and Maps. |
| importCompatibilitySchemaSnapshot(config) | Alpha | TreeViewConfiguration | Parse the format exported by exportCompatibilitySchemaSnapshot(config) into a schema. Can load snapshots created by the same or older package versions, but not necessarily newer versions. |
| incrementalEncodingPolicyForAllowedTypes(rootSchema) | Alpha | IncrementalEncodingPolicy | This helper function incrementalEncodingPolicyForAllowedTypes(rootSchema) can be used to generate a callback function of type IncrementalEncodingPolicy. It determines if each AllowedTypes in a schema should be incrementally summarized. This callback can be passed as the value for shouldEncodeIncrementally parameter when creating the tree. |
| independentInitializedView(config, options, content) | Alpha | TreeViewAlpha<TSchema> | Create an initialized TreeView that is not tied to any ITree instance. |
| independentView(config, options) | Alpha | TreeViewAlpha<TSchema> | Create an uninitialized TreeView that is not tied to any ITree instance. |
| normalizeAllowedTypes(types) | Alpha | AllowedTypesFull | Normalizes an ImplicitAllowedTypes to an AllowedTypesFull. |
| persistedToSimpleSchema(persisted, options) | Alpha | SimpleTreeSchema | A way to parse schema in the persisted format from extractPersistedSchema(schema, minVersionForCollab, includeStaged). |
| replaceConciseTreeHandles(tree, replacer) | Alpha | ConciseTree<T> | Clones tree, replacing any handles. |
| replaceHandles(tree, replacer) | Alpha | unknown | Clones tree, replacing any handles. |
| replaceVerboseTreeHandles(tree, replacer) | Alpha | VerboseTree<T> | Clones tree, replacing any handles. |
| singletonSchema(factory, name) | Beta | TreeNodeSchemaClass<ScopedSchemaName<TScope, TName>, NodeKind.Object, TreeNode & { readonly value: TName; }, Record<string, never>, true, Record<string, never>, undefined> | Create a schema for a node with no state. |
| snapshotSchemaCompatibility(options) | Beta | void | Check currentViewSchema for compatibility with a collection of historical schema snapshots stored in snapshotDirectory. |
| trackDirtyNodes(view, dirty) | Alpha | () => void | Registers a visitor on the view's forest that tracks which nodes are dirty. |
Variables
| Variable | Alerts | Modifiers | Type | Description |
|---|---|---|---|---|
| ArrayNodeSchema | Alpha | readonly | { readonly [Symbol.hasInstance]: (value: TreeNodeSchema) => value is ArrayNodeSchema; } | |
| contentSchemaSymbol | Alpha | readonly | unique symbol | The intended type of insertable content that is to become a TreeNode. |
| FluidClientVersion | Alpha | readonly | { readonly v2_0: "2.0.0"; readonly v2_43: "2.43.0"; readonly v2_52: "2.52.0"; readonly v2_73: "2.73.0"; readonly v2_74: "2.74.0"; readonly v2_80: "2.80.0"; } | Versions of Fluid Framework client packages. |
| ForestTypeExpensiveDebug | Beta | readonly | ForestType | Slow implementation of forest intended only for debugging. |
| ForestTypeOptimized | Beta | readonly | ForestType | Optimized implementation of forest. |
| ForestTypeReference | Beta | readonly | ForestType | Reference implementation of forest. |
| FormatValidatorBasic | Alpha | readonly | import("../codec/codec.js").FormatValidator | A FormatValidator implementation which uses TypeBox's JSON schema validator. |
| FormatValidatorNoOp | Alpha | readonly | FormatValidator | A FormatValidator which does no validation. |
| incrementalSummaryHint | Alpha | readonly | unique symbol | A symbol when present in the metadata's custom property as true, opts in the allowed types to incremental summary optimization. These allowed types will be optimized during summary such that if they don't change across summaries, they will not be encoded and their content will not be included in the summary that is uploaded to the service. |
| MapNodeSchema | Alpha | readonly | { readonly [Symbol.hasInstance]: (value: TreeNodeSchema) => value is MapNodeSchema; } | |
| ObjectNodeSchema | Alpha | readonly | { readonly [Symbol.hasInstance]: (value: TreeNodeSchema) => value is ObjectNodeSchema<string, RestrictiveStringRecord<ImplicitFieldSchema>, boolean, unknown>; } | |
| RecordNodeSchema | Alpha | readonly | { readonly [Symbol.hasInstance]: (value: TreeNodeSchema) => value is RecordNodeSchema<string, ImplicitAllowedTypes, true, unknown>; } | |
| rollback | readonly | unique symbol | A special object that signifies when a SharedTree transaction should "roll back". | |
| SchemaFactory_base | System | readonly | SchemaStatics & (new () => SchemaStatics) | Base class for SchemaFactory, exposes SchemaStatics as both static properties and member properties. |
| SharedTree | Legacy | readonly | ISharedObjectKind<ITree> & SharedObjectKind<ITree> | SharedTree is a hierarchical data structure for collaboratively editing strongly typed JSON-like trees of objects, arrays, and other data types. |
| SharedTreeAttributes | Legacy | readonly | IChannelAttributes | |
| SharedTreeFactoryType | Legacy | readonly | ||
| Tree | readonly | Tree | The Tree singleton which holds various functions for interacting with TreeNodes. | |
| TreeAlpha | Alpha | readonly | TreeAlpha | Extensions to Tree and TreeBeta which are not yet stable. |
| TreeArrayNode | readonly | { readonly spread: <T>(content: Iterable<T>) => IterableTreeArrayContent<T>; } | A TreeNode which implements 'readonly T[]' and the array mutation APIs. | |
| TreeBeta | Beta | readonly | TreeBeta | Extensions to Tree which are not yet stable. |
| typeSchemaSymbol | System | readonly | unique symbol | The type of a TreeNode. For more information about the type, use Tree.schema(theNode) instead. |
| UnsafeUnknownSchema | Alpha | readonly | unique symbol | A special type which can be provided to some APIs as the schema type parameter when schema cannot easily be provided at compile time and an unsafe (instead of disabled) editing API is desired. |