TreeBranchCommitMetadata Interface
Metadata describing a single commit in a UntypedTreeViewAlpha's history.
To use, import via fluid-framework/alpha.
For more information about our API support guarantees, see here.
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
| Property | Alerts | Modifiers | Type | Description |
|---|---|---|---|---|
| custom | Alpha | readonly | JsonCompatibleReadOnlyObject | undefined | Arbitrary, application-defined metadata that was attached to this commit when it was created, flattened into a single object. |
| customTree | Alpha | readonly | CustomMetadataTree | undefined | The tree of metadata attached to this commit, reflecting the nesting of the transactions that produced it. |
| revision | Alpha | readonly | CommitRevision | The revision UUID that uniquely identifies this commit within the branch's history. |
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| getParent() | Alpha | TreeBranchCommitMetadata | undefined | 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). |
Property Details
custom
Arbitrary, application-defined metadata that was attached to this commit when it was created, flattened into a single object.
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.
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.
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).
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