google / google/closure-compiler
ES6 and Object.defineProperties issue
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
lets say i have the following class:
```
class Object3D extends EventDispatcher {
constructor() {
super();
const quaternion = new Quaternion();
Object.defineProperties( this, {
quaternion: {
configurable: true,
enumerable: true,
value: quaternion
}
} );
}
onRotationChange() {
this.quaternion.setFromEuler(........);
}
}
```
and the following warning:
```
core/Object3D.js:123:7: WARNING - [JSC_INEXISTENT_PROPERTY] Property quaternion never defined on Object3D
123| this.quaternion.setFromEuler();
^^^^^^^^^^
```
I have no idea what i do wrong, maybe i missed something ?
Contributor guide
Assessment
This issue has not been assessed yet.