Skip to main content
Version: v2

CommitOutcome Enum

Details about what changes from a commit were applied or not.

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

To use, import via @fluidframework/tree/alpha.

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

Signature​

export declare enum CommitOutcome

Flags​

FlagAlertsDescription
FullyAppliedAlphaAll of the changes in the commit were applied.
FullyDroppedAlphaNone of the changes in the commit were applied.
NewContentOnlyAlphaOnly the creation of new content was applied. All other changes (including the insertion and/or modification of the new content) were dropped.

FullyApplied​

All of the changes in the commit were applied.

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

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

Signature​

FullyApplied = 0

FullyDropped​

None of the changes in the commit were applied.

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

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

Signature​

FullyDropped = 1

Remarks​

This occurs when an implicit constraint has been violated. Implicit constraints are those that are automatically enforced by SharedTree on all changes.

Such a violation typically arises in one of two scenarios: 1. A schema change conflicts with a concurrent data or schema change that was sequenced before it. 2. A data change conflicts with a concurrent schema change that was sequenced before it.

NewContentOnly​

Only the creation of new content was applied. All other changes (including the insertion and/or modification of the new content) were dropped.

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

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

Signature​

NewContentOnly = 2

Remarks​

This occurs when at least one explicit constraint has been violated (and no implicit constraints were violated.)

Explicit constraints are those that are explicitly added through preconditions or preconditionsOnRevert.

The new content may be edited (and potentially inserted) by subsequent commits, assuming those commits are not themselves subject to constraint violations. Note that, if left uninserted, new content will eventually be garbage-collected from the document.

Applications typically choose to treat this outcome as equivalent to FullyDropped and, when reattempting the change, generate a different copy of the new content if any.