@mocanvas/editor · function
declare function validateProps<Props extends UnknownRecordProps>(props: Props, value: unknown, path?: readonly ValidationPathSegment[]): RecordPropsType<Props>Validate value against a props map.
Every declared prop is validated; props the map does not declare are
rejected, because an undeclared prop is either a typo or a prop whose
migration was forgotten. Errors are reported under path (pass
["shape", "props"] to get At shape.props.w: …).
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.