TLShape
See source codeThe set of all shapes that are available in the editor, including unknown shapes.
This is the primary shape type used throughout tldraw. It includes both the built-in default shapes and any custom shapes that might be added.
type TLShape = TLDefaultShape | TLUnknownShape
Example
// Work with any shape in the editor
function moveShape(shape: TLShape, deltaX: number, deltaY: number): TLShape {
return {
...shape,
x: shape.x + deltaX,
y: shape.y + deltaY,
}
}
Prev
TLSerializedStoreNext
TLShapeId