kungfooman / RuntimeTypeInspector.js

Checking JSDoc types at runtime for high-quality types - Trust is good, control is better.
MIT License
8 stars 0 forks source link

Remove useless warning from getters with JSDoc description #161

Closed kungfooman closed 3 weeks ago

kungfooman commented 3 weeks ago

Example:

class Test {
  _abc = 123;
  /**
   * Only description for getter.
   */
  get abc() {
    return this._abc;
  }
  /**
   * Only description for setter.
   */
  set abc(val) {
    this._abc = val;
  }
}
const test = new Test();
console.log(test.abc);
test.abc = 1;
console.log(test.abc);

Warning:

This should never happen, please check your input code.

image

Not a big issue, just a case that I didn't see during last refactor... gotta update a bit.