Encountering a TypeScript error when trying to add a custom attribute to a new FabricJS object. How can I extend the IObjectOptions globally to include this custom attribute?
const workarea = new fabric.Rect({
id: "workarea",
width: 250,
height: 150,
});
Upon hovering over the "id: workarea", the following error message is displayed:
Argument of type '{ id: string; width: number; height: number; }' is not assignable to parameter of type 'IRectOptions'. Object literal may only specify known properties, and 'id' does not exist in type 'IRectOptions'.