TLLibraryRecordPropsMap
Table of contents
The library record types by type name, for a host to add to TLGlobalRecordPropsMap so that TLRecord includes them. Do so only where the store registers librarySchemaRecords: the types then match what the store holds.
interface TLLibraryRecordPropsMap {}Example
const schema = createTLSchema({ records: librarySchemaRecords });
declare module "tldraw" {
interface TLGlobalRecordPropsMap extends TLLibraryRecordPropsMap {}
}
editor.store.query.records("library-item"); // typed as TLLibraryItemRecordProperties
"library-item-content"
"library-item-content": TLLibraryItemContentRecord;"library-item"
"library-item": TLLibraryItemRecord;library
library: TLLibrary;Prev
TLLibraryItemRecordNext
TLLineShapePoint