createTLSchema

Public Function

Create a store schema for a tldraw store that includes all the default shapes together with any custom shapes.

Parameters
NameDescription

opts

(optional)

{
  customShapes?:
    | { [K in T['type']]: CustomShapeInfo<T> }
    | undefined
  derivePresenceState?:
    | ((
        store: TLStore
      ) => Signal<null | TLInstancePresence>)
    | undefined
}
Returns
StoreSchema<TLRecord, TLStoreProps>
References

TLUnknownShape, CustomShapeInfo, TLStore, Signal, TLInstancePresence, StoreSchema, TLRecord, TLStoreProps

Edit this page
Last edited on 25 May 2023
createShapeValidatorcursorTypeValidator