Range.Basic: define properties in constructor

This commit is contained in:
Peter Fajdiga
2024-10-27 23:27:14 +01:00
parent b2d81796f8
commit 78ab48ee09

View File

@@ -6,13 +6,10 @@ type Range = {
namespace Range {
export class Basic {
private readonly x: number;
private readonly width: number;
constructor(x: number, width: number) {
this.x = x;
this.width = width;
}
constructor(
private readonly x: number,
private readonly width: number,
) {}
public getLeft() {
return this.x;