I have class that has a property:
class MyClass {
constructor() {
this.property = null;
}
}
The property can be null
or an Array
instance. I tried this:
/**
* @property property {Array}
*/
class MyClass ...
This:
/**
* @property MyClass.property {Array}
*/
class MyClass ...
And this:
class MyClass {
/**
* @property property {Array}
*/
constructor() ...
And I'm still seeing this in intellisense:
So can anyone tell me how to do this correctly?
So far, the best approach was this:
class MyClass {
constructor() {
/** @type {MyClass2} **/
this.property = null;
}
}
It still is kind of buggy but most of the time it works.