-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
Expected behavior
Passing valid TS Constructor as arg should not throw an error
Actual behavior
Passing valid TS Constructor as arg does throw an error
Oops! Something went wrong! :(
ESLint: 7.2.0
TypeError: Cannot read property 'name' of undefined
Occurred while linting thing.ts:11
at getPropertiesFromPropertySignature (./node_modules/eslint-plugin-jsdoc/dist/jsdocUtils.js:96:28)
Similar to #570
ESLint Config
module.exports = {
plugins: ['@typescript-eslint', 'jsdoc'],
extends: ['plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
settings: {
jsdoc: {
mode: 'typescript',
},
},
rules: {
'jsdoc/check-param-names': 'error',
},
};ESLint sample
/**
* @class
*/
export class Thing {
foo: any;
/**
* @param {} params
* @param {} C
*/
constructor(C: { new (): any }) {
this.foo = new C();
}
}Environment
- Node version: 14.3.0
- ESLint version 7.2.0
eslint-plugin-jsdocversion: 27.0.6