You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Got a Class that Extends Array (FooArray) and am trying to create a Typed FooArray in another place. JSDoc suggests that I would be correct by using FooArray.<Type> (As the "normal" suggested method is either Type[] or Array.<Type>) and this markdown indeed seems to be parsed by jsdoc without issues, however VSC ends up detecting neither FooArray nor Type
Full example:
/**
* @class FooArray
* @extends {Array}
*/
class FooArray extends Array {
constructor() {
super();
//whatever
}
/**
* returns "baz"
* @returns {string}
*/
bar() {
return "baz";
}
};
//This array will be filled with only values of type XYZ
/** @type {Array.<XYZ>} => instance[0] is correctly tagged / detected, instance.bar() is not (Obviously) */
/** @type {FooArray} => instance.bar() is documented but JSDoc has no idea of the values in the Array */
/** @type {FooArray.<XYZ>} => Neither is detected / documented */
let instance = new FooArray();
The text was updated successfully, but these errors were encountered:
Got a Class that Extends Array (FooArray) and am trying to create a Typed FooArray in another place. JSDoc suggests that I would be correct by using
FooArray.<Type>
(As the "normal" suggested method is eitherType[]
orArray.<Type>
) and this markdown indeed seems to be parsed by jsdoc without issues, however VSC ends up detecting neitherFooArray
norType
Full example:
The text was updated successfully, but these errors were encountered: