* Create a single shape. * * @example * ```ts * editor.createShape(myShape) * editor.createShape({ id: 'box1', type: 'text', props: { richText: toRichText("ok") } }) * ``` * * @param shape - The shape (or shape partial) to create. * * @public
(shape: TLCreateShapePartial<TShape>)
| 8470 | * @public |
| 8471 | */ |
| 8472 | createShape<TShape extends TLShape>(shape: TLCreateShapePartial<TShape>): this { |
| 8473 | this.createShapes([shape]) |
| 8474 | return this |
| 8475 | } |
| 8476 | |
| 8477 | /** |
| 8478 | * Create shapes. |
nothing calls this directly
no test coverage detected