Type Alias Shape

Shape:
    | Board
    | Group
    | Boolean
    | Rectangle
    | Path
    | Text
    | Ellipse
    | SvgRaw
    | Image

Shape represents a union of various shape types used in the Penpot project. This type allows for different shapes to be handled under a single type umbrella.

let shape: Shape;
if (penpot.utils.types.isRectangle(shape)) {
console.log(shape.type);
}