SG
Size: a a a
SG
SG
EO
SG
EO
T
SG
EO
toObject<T extends ShapeObject>(): T {
return {
type: this.constructor.name,
options: {
text: this._text,
width: this._width,
height: this._height,
x: this._x,
y: this._y,
background: this._background,
foreground: this._foreground
}
} as ShapeObject;
}
SG
SG
toObject<T extends ShapeObject>(): ShapeObject
EO
SG
SG
Т
EO
EO
Т
SG
EO
return JSON.stringify(this.toObject<ShapeObject>());
SG
EO
export interface ShapeObject {
type: string
options?: Partial<ShapeOptions>
}