@mocanvas/editor · function

createAssetPropsValidator

declare function createAssetPropsValidator<Type extends string, Props extends object>(type: Type, props: PropsMap, options?: RecordValidatorOptions): Validator<BaseAsset<Type, Props>>

The validator for an asset type, from its prop map.

Same policy as createShapeValidator: an unknownProps: "keep" asset is one the store is holding, and a .tldr from a newer build may carry asset props this one cannot describe.

Mentioned here

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.