Skip to content

Commit

Permalink
Update standard_private_fields.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn0 committed Mar 9, 2020
1 parent baa3d78 commit 097f271
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/typescript_class/standard_private_fields.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
class Square {
#sideLength: number;
readonly #area: number;

constructor(sideLength: number) {
this.#sideLength = sideLength;
this.#area = this.#sideLength ** 2;
}

equals(other: any) {
Expand Down

0 comments on commit 097f271

Please sign in to comment.