warning
jsdoc/no-undefined-typesChecks that types in jsdoc comments are defined. This can be used to check unimported types.
Examples
❌ Incorrect
/**
* @param {strnig} foo - Bar.
*/
function quux(foo) {
}
// Message: The type 'strnig' is undefined.
✅ Correct
/**
* @param {string} foo - Bar.
*/
function quux1(foo) {
}
/**
* @param {Promise} foo - Bar.
*/
function quux2(foo) {
}
class MyClass {}
/**
* @param {MyClass} foo - Bar.
*/
function quux3(foo) {
console.log(foo);
}