I'm trying to setup TypeScript on a JS codebase with allowJs and checkJs
I have a JSDoc that uses an interface as a parameter type:
* @param {IPlugin[]|IPlugin} plugins plugin instance(s).
In the same file, I have the interface defined via JSDoc:
/**
* Plugin extension hooks.
* @interface IPlugin
* @since 2.1.0
*/
This looks like valid JSDoc to me. However, TypeScript is failing on it:
src/core/core.plugins.js:243:13 - error TS2304: Cannot find name 'IPlugin'.
243 * @param {IPlugin[]|IPlugin} plugins plugin instance(s).
Any ideas how I get this to work?