Skip to content

Commit

Permalink
feat(esl-utils): made Rect class immutable
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `Rect` utility object now immutable from TS perspective
  • Loading branch information
dshovchko authored and ala-n committed Mar 12, 2024
1 parent d1d03b9 commit 923c70a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/esl-utils/dom/rect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import type {Point} from './point';
*/
export class Rect implements Point {
/** The X coordinate of the Rect's origin (top-left corner of the rectangle). */
public x;
public readonly x;
/** The Y coordinate of the Rect's origin (top-left corner of the rectangle). */
public y;
public readonly y;
/** The width of the Rect. */
public width;
public readonly width;
/** The height of the Rect. */
public height;
public readonly height;

/**
* The static method creates a new Rect instance from a DOMRect object of BoundingClientRect.
Expand Down

0 comments on commit 923c70a

Please sign in to comment.