@mocanvas/editor · function
declare function createCustomRecordType(info: CustomRecordInfo<string>): RecordType<UnknownCustomRecord, any>Build the RecordType for one custom record type.
Every custom record shares the custom typeName — one entry in the store's
type map covers all of them — but each gets its own validator, keyed to its
own type and its own props. That is why this returns a record type per
declaration rather than one for the lot: the store validates a record with
the type registered under its typeName, and a single shared validator could
not tell a review from a checklist.
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.