Skip to main content

TreeIndex Interface

An index allows lookup content from a tree using keys.

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

To use, import via fluid-framework/alpha.

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

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature

/** @sealed */
export interface TreeIndex<TKey, TValue> extends ReadonlyMap<TKey, TValue>

Extends: ReadonlyMap<TKey, TValue>

Type Parameters

ParameterDescription
TKey
TValue

Remarks

The index will be kept up to date with the TreeBranchAlpha it is associated with. Keeping an index up to date incurs overhead. Therefore, indexes should only be created when needed and disposed when no longer needed.

Methods

MethodAlertsReturn TypeDescription
dispose()AlphavoidDisposes the index such that it can no longer be used and receives no updates for changes in the tree.

Method Details

dispose

Disposes the index such that it can no longer be used and receives no updates for changes in the tree.

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

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

Signature

dispose(): void;

Remarks

An index may not be used after it is disposed.