@mocanvas/editor · function

createBindingValidator

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

The validator for a binding type, from its static props.

A binding is two shape ids and a props bag; fromId and toId are validated as shape ids rather than as strings because a binding pointing at a page is the kind of corruption that only shows up when something tries to render it.

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.