Skip to main content

TreeBranchCommitMetadata Interface

Metadata describing a single commit in a UntypedTreeViewAlpha's history.

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 TreeBranchCommitMetadata

Properties

PropertyAlertsModifiersTypeDescription
customAlphareadonlyJsonCompatibleReadOnlyObject | undefinedArbitrary, application-defined metadata that was attached to this commit when it was created, flattened into a single object.
customTreeAlphareadonlyCustomMetadataTree | undefinedThe tree of metadata attached to this commit, reflecting the nesting of the transactions that produced it.
revisionAlphareadonlyCommitRevisionThe revision UUID that uniquely identifies this commit within the branch's history.

Methods

MethodAlertsReturn TypeDescription
getParent()AlphaTreeBranchCommitMetadata | undefinedThe metadata for the commit that this commit was based on, or undefined if this commit has no parent (i.e. it is the oldest commit in the branch's history).

Property Details

custom

Arbitrary, application-defined metadata that was attached to this commit when it was created, flattened into a single object.

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

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

Signature

readonly custom: JsonCompatibleReadOnlyObject | undefined;

Type: JsonCompatibleReadOnlyObject | undefined

Remarks

This is undefined for commits that were not annotated.

A commit may be produced by nested transactions, each of which may supply metadata. This property combines them: where two of them used the same property, the outermost transaction wins, and between siblings the later one wins. Use customTree to recover which transaction supplied what.

customTree

The tree of metadata attached to this commit, reflecting the nesting of the transactions that produced it.

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

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

Signature

readonly customTree: CustomMetadataTree | undefined;

Type: CustomMetadataTree | undefined

Remarks

The structural counterpart to custom, and undefined whenever it is. Prefer custom unless you need to know which transaction supplied a particular property.

revision

The revision UUID that uniquely identifies this commit within the branch's history.

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

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

Signature

readonly revision: CommitRevision;

Type: CommitRevision

Method Details

getParent

The metadata for the commit that this commit was based on, or undefined if this commit has no parent (i.e. it is the oldest commit in the branch's history).

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

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

Signature

getParent(): TreeBranchCommitMetadata | undefined;

Remarks

This method may return a different value over time if the parent commit is trimmed from the branch's history.

Returns

Return type: TreeBranchCommitMetadata | undefined