From c76d4fe78156e71406758ca7737922fa17236917 Mon Sep 17 00:00:00 2001 From: Yorick van Klinken Date: Tue, 11 Jun 2024 08:44:16 +0200 Subject: [PATCH] fix: Added default value to Canvas constructor (#3094) The combined type for the constructor property has no required fields. This way you don't have to add an empty object to the superclass's constructor when, for example, creating a Canvas subclass --- src/engine/Graphics/Canvas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/Graphics/Canvas.ts b/src/engine/Graphics/Canvas.ts index f3526c043..126a5ad9c 100644 --- a/src/engine/Graphics/Canvas.ts +++ b/src/engine/Graphics/Canvas.ts @@ -22,7 +22,7 @@ export class Canvas extends Raster { return this._ctx; } - constructor(private _options: GraphicOptions & RasterOptions & CanvasOptions) { + constructor(private _options: GraphicOptions & RasterOptions & CanvasOptions = {}) { super(_options); }