TLSchema
See source codeThe complete schema definition for a tldraw store, encompassing all record types, validation rules, and migration sequences. This schema defines the structure of the persistent data model used by tldraw.
type TLSchema = StoreSchema<TLRecord, TLStoreProps>
Example
import { Store } from '@tldraw/store'
import { createTLSchema, defaultShapeSchemas } from '@tldraw/tlschema'
const schema: TLSchema = createTLSchema({
shapes: defaultShapeSchemas,
})
const store = new Store({ schema })
Prev
TLRichTextNext
TLSerializedStore