Skip to main content

FormatValidator Interface

A kind of validator for SharedTree's internal data formats.

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.

Sealed

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 FormatValidator extends ErasedType<"FormatValidator">

Extends: ErasedType<"FormatValidator">

Remarks

Assuming no data corruption or type confusion, such validation should never fail. Any client version compatibility issues should instead be detected by the data format versioning which Shared Tree does internally independent of data format validation. However, persisted data can sometimes be corrupted, bugs can produce invalid data, or users can mix up which data is compatible with which APIs. In such cases, a format validator can help catch issues.

Current options are FormatValidatorNoOp and FormatValidatorBasic. \