IncrementalEncodingPolicy TypeAlias
Policy type to determine whether one of more fields of a node in a schema should be incrementally encoded.
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.
Signature
export type IncrementalEncodingPolicy = (nodeIdentifier: string | undefined, fieldKey?: string) => boolean;
Remarks
See incrementalEncodingPolicyForAllowedTypes(rootSchema) for a reference policy implementation.
Incremental encoding has a significant size overhead, but allows reuse of previously encoded unchanged subtrees. Thus it should only be enabled for large subtrees which are modified infrequently. TODO: AB#9068: Measure the actual overhead.