-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
In jsdoc type definitions are picked up regardless of the file they are defined in. Consider:
foo.js
'use strict'
/**
* Foo is an interface not a class.
*
* @interface
* @private
*/
class Foo {
/**
* The name of the thing.
*
* @type {string}
*/
name
}
module.exports = Foobar.js
'use strict'
/**
* Bar is a Foo
*
* @extends Foo
*/
class Bar extends Foo {
/**
* The answer to everything.
*
* @type {number}
*/
answer = 42
constructor() {
super()
this.name = 'Bar'
}
}
module.exports = BarRunning jsdoc -p *.js on the above will result in an out/index.html that shows a Bar definition that links back to Foo:
But if we have the jsdoc/no-undefined-types rule enabled for this eslint plugin we will get an error in bar.js about Foo being undefined. I think #99 is discussing this same problem, but I'm not clear what the resolution is. Are we able to configure this plugin to work as jsdoc does?
