Tracked properties are non-enumerable
Open
keep-open
wontfix
- Dominant language
- TypeScript
- Stars
- 22.6k
- Forks
- 4.2k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 15
Description
Class properties are enumerable:
```js
class Foo {
someProp;
}
console.log(Object.keys(new Foo()));
// prints ["someProp"]
```
But if we mark one as `@tracked`, it becomes non-enumerable:
```js
class Foo {
@tracked
someProp;
}
console.log(Object.keys(new Foo()));
// prints []
```
This seems bad and confusing so I suspect it is unintentional.
Contributor guide
Assessment
This issue has not been assessed yet.