google / google/closure-compiler

ES6 and Object.defineProperties issue

Open
#3,744 10 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.