Skip to content

Commit ca0de3a

Browse files
committed
revert: cannot annotate name and message as readonly; document the issue as TODO
1 parent 96bc9e1 commit ca0de3a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ContractError.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ export class ContractError extends Error {
9797
})
9898
}
9999

100-
override readonly name!: string
101-
override readonly message!: string
100+
/* TODO: We should be able to tell TS that in this hierarchy `name` and `message` are read-only, but we cannot? Saying
101+
it here introduces an own property, while we want to use the property from the prototype. Note that the value
102+
of `name` and `message` can be changed in the prototypes of subclasses. */
102103
readonly rawStack!: string
103104
override readonly stack: string
104105

0 commit comments

Comments
 (0)