| 1323 | getShapeUtil<S extends TLShape>(shape: S | TLShapePartial<S> | S['type']): ShapeUtil<S> |
| 1324 | getShapeUtil<T extends ShapeUtil>(type: T extends ShapeUtil<infer R> ? R['type'] : string): T |
| 1325 | getShapeUtil(arg: string | { type: string }) { |
| 1326 | const type = typeof arg === 'string' ? arg : arg.type |
| 1327 | const shapeUtil = getOwnProperty(this.shapeUtils, type) |
| 1328 | assert(shapeUtil, `No shape util found for type "${type}"`) |
| 1329 | return shapeUtil |
| 1330 | } |
| 1331 | |
| 1332 | /** |
| 1333 | * Returns true if the editor has a shape util for the given shape / shape type. |