diff --git a/ui/src/lib/door.ts b/ui/src/lib/door.ts index a0b2b86..17b244e 100644 --- a/ui/src/lib/door.ts +++ b/ui/src/lib/door.ts @@ -4,6 +4,8 @@ export class Door { private _day = -1; public position: Rectangle; + constructor(position: Rectangle); + constructor(position: Rectangle, day: number); constructor(position: Rectangle, day = -1) { this.day = day; this.position = position; diff --git a/ui/src/lib/rectangle.ts b/ui/src/lib/rectangle.ts index 455fbcf..3c7ec63 100644 --- a/ui/src/lib/rectangle.ts +++ b/ui/src/lib/rectangle.ts @@ -4,6 +4,8 @@ export class Rectangle { private readonly corner_1: Vector2D; private readonly corner_2: Vector2D; + constructor(); + constructor(corner_1: Vector2D, corner_2: Vector2D); constructor(corner_1 = new Vector2D(), corner_2 = new Vector2D()) { this.corner_1 = corner_1; this.corner_2 = corner_2; diff --git a/ui/src/lib/vector2d.ts b/ui/src/lib/vector2d.ts index 2d342a8..2f7d799 100644 --- a/ui/src/lib/vector2d.ts +++ b/ui/src/lib/vector2d.ts @@ -2,6 +2,8 @@ export class Vector2D { public readonly x: number; public readonly y: number; + constructor(); + constructor(x: number, y: number); constructor(x = 0, y = 0) { this.x = x; this.y = y;