@mocanvas/editor · function

createBaseShapeValidator

declare function createBaseShapeValidator(): Validator<BaseShape<string, object>>

The fields every shape has, whatever its type — everything but props.

Used for a shape whose type this build has no props map for. Forward compatibility is about props: a newer generation of the format may carry props this build cannot describe, and those must survive a round trip. It says nothing about x being a number or index being an index key, which are true of every shape record there has ever been. Passing an unknown type through untouched let { x: "NOT A NUMBER" } into the store.

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.