TreeContextAlpha Interface
Provides additional APIs that may be used to interact with a tree node or a tree node's SharedTree.
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.
Signature
export interface TreeContextAlpha
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| isBranch() | Alpha | this is TreeBranchAlpha | True if this context is associated with a branch and false if it is associated with an unhydrated node. |
| runTransaction(transaction, params) | Alpha | TransactionResultExt<TValue, TValue> | Run a synchronous transaction which groups sequential edits to the tree into a single atomic edit if possible. |
| runTransaction(transaction, params) | Alpha | TransactionResult | An overload of runTransaction which does not return a value. |
| runTransactionAsync(transaction, params) | Alpha | Promise<TransactionResultExt<TValue, TValue>> | An asynchronous version of runTransaction. |
| runTransactionAsync(transaction, params) | Alpha | Promise<TransactionResult> | An overload of runTransactionAsync which does not return a value. |
Method Details
isBranch
True if this context is associated with a branch and false if it is associated with an unhydrated node.
This API is provided as an alpha preview and may change without notice.
For more information about our API support guarantees, see here.
Signature
isBranch(): this is TreeBranchAlpha;
Remarks
If this returns true, the context can be safely inferred or cast to TreeBranchAlpha to access additional branch-specific APIs.