SharedTreeOptions Interface
Configuration options for SharedTree with alpha features.
To use, import via @fluidframework/tree/alpha.
For more information about our API support guarantees, see here.
This type is "input," meaning that code outside of the library defining it should not read from it. Future versions of this type may add optional members or make typing of members more general.
Signature
export interface SharedTreeOptions extends SharedTreeOptionsBeta, Partial<CodecWriteOptions>, Partial<SharedTreeFormatOptions>
Extends: SharedTreeOptionsBeta, Partial<CodecWriteOptions>, Partial<SharedTreeFormatOptions>
Properties
| Property | Alerts | Modifiers | Default Value | Type | Description |
|---|---|---|---|---|---|
| enableSharedBranches | Alpha | optional, readonly | boolean | Experimental feature flag to enable shared branches. This feature is not yet complete and should not be used in production. Defaults to false. | |
| retainHistory | Alpha | optional, readonly | false | boolean | When true, prevents trunk commits from being trimmed/evicted, even after they fall outside the collaboration window. |
| shouldEncodeIncrementally | Alpha | optional | IncrementalEncodingPolicy | Returns whether a node / field should be incrementally encoded. |
Property Details
enableSharedBranches
Experimental feature flag to enable shared branches. This feature is not yet complete and should not be used in production. Defaults to false.
For more information about our API support guarantees, see here.
Signature
readonly enableSharedBranches?: boolean;
Type: boolean
retainHistory
When true, prevents trunk commits from being trimmed/evicted, even after they fall outside the collaboration window.
For more information about our API support guarantees, see here.
Signature
readonly retainHistory?: boolean;
Type: boolean
Remarks
By default, SharedTree evicts trunk commits once all peers have acknowledged them (i.e. once they are outside the collaboration window), and they are not otherwise retained (e.g. by revertibles or local branches), to bound memory usage. Enabling this flag retains the full trunk history for the lifetime of the client, which increases memory usage over time and should be used with care.
shouldEncodeIncrementally
Returns whether a node / field should be incrementally encoded.
For more information about our API support guarantees, see here.
Signature
shouldEncodeIncrementally?: IncrementalEncodingPolicy;
Type: IncrementalEncodingPolicy