CommitStagedChangesOptionsExperimental Interface
-
These APIs are unstable, and can be changed at will. They should only be used with direct agreement with the Fluid Framework.
To use, import via @fluidframework/runtime-definitions/legacy
.
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 CommitStagedChangesOptionsExperimental
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
squash | Alpha |
optional |
boolean | If true, intermediate states created by changes made while in staging mode will be "squashed" out of the ops which were created during staging mode. Defaults to false. |
Property Details
squash
If true, intermediate states created by changes made while in staging mode will be "squashed" out of the ops which were created during staging mode. Defaults to false.
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
squash?: boolean;
Type: boolean
Remarks
The squash parameter is analogous to git squash
but differs in a notable way: ops created by a client exiting staging mode are not necessarily coalesced into a single op or something like it. It still does have the desirable property that "unnecessary changes" (such as inserting some content then removing it) will be removed from the set of submitted ops, which means it helps reduce network traffic and the chance of unwanted data being persisted--even if only temporarily--in the document.
By not attempting to reduce the set of changes to a single op a la git squash
, we can better preserve the ordering of changes that remote clients see such that they better align with the client which submitted the changes.