You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The predicate the symbol serialiser uses to distinguish static properties from expando namespace properties is not precise enough. The fix is to make sure that properties defined inside a class are serialised there instead of in the merged namespace.
Previously static class members would be treated the same way as expando
namespace assignments to a class:
```ts
class C {
static get x() { return 1 }
}
C.y = 12
```
This PR adds a syntactic check to the static/namespace filter that
treats symbols whose valueDeclaration.parent is a class as statics.
Fixes#37289
* Fix serialisation of static class members in JS
Previously static class members would be treated the same way as expando
namespace assignments to a class:
```ts
class C {
static get x() { return 1 }
}
C.y = 12
```
This PR adds a syntactic check to the static/namespace filter that
treats symbols whose valueDeclaration.parent is a class as statics.
Fixes#37289
* fix messed-up indent
* Extract function
Uh oh!
There was an error while loading. Please reload this page.
TypeScript Version: 3.9.0-dev.20200309
Search Terms:
static get
,static get cannot find name
Code
Expected behavior:
Actual behavior:
Playground Link: Provided
The text was updated successfully, but these errors were encountered: