@mocanvas/store · interface
interface StoreValidator<R extends UnknownRecord>This one ships without a description. The signature above is read from the package, and the guides cover the area it belongs to.
Methods · 1
validate(record: unknown): RProperties · 1
validateUsingKnownGoodVersion?: ((knownGoodVersion: R, newRecord: unknown) => R) | undefinedOptional fast path: validate newRecord knowing that knownGoodVersion
is a valid record of the same type. Implementations may skip the parts
that did not change.
Declared as a property that may be undefined rather than as an optional
method, so that a validator carrying an explicit undefined — which is
what a class with an optional constructor argument produces — still
satisfies this under exactOptionalPropertyTypes.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.