@mocanvas/editor · function
declare function createShapeValidator<Type extends string, Props extends object>(type: Type, props: PropsMap, meta?: PropsMap, options?: RecordValidatorOptions): Validator<BaseShape<Type, Props>>The validator for a shape type, from its static props.
``ts
const formatShapeValidator = createShapeValidator("format", {
w: T.nonZeroNumber,
h: T.nonZeroNumber,
color: DefaultColorStyle,
})
``
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.