-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(instrumenter): don't mutate constructor blocks with initialized c…
…lass properties (#2484) Don't mutate constructor block statements when the class contains initialized class properties. For example: ```ts class Foo extends Baz { bar = 'bar'; constructor() { // Don't mutate this block! super(); } } ``` If you mutate the constructor block above, and TypeScript transpiles the code, it will call `this.bar` before the `super()` is initiated. Resulting in a runtime error. Fixes #2474
- Loading branch information
Showing
3 changed files
with
44 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters