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
No warning should be triggered when this param is accompanied by a destructured parameter.
Actual behavior
A warning is triggered, implying that the @param for the destructured root is being referenced as a match for this
Note: this warning does not trigger when the parameter following this is not destructured, or when @param is explicitly provided for this, as in the following cases:
/** * Returns the sum of two numbers * @param {number} a First value * @param {number} b Second value * @returns {number} Sum of a and b */functionsum(this: unknown,a: number,b: number){returna+b;}
/** * Returns the sum of two numbers * @param this 'this' * @param options Object to destructure * @param options.a First value * @param options.b Second value * @returns Sum of a and b */functionsumDestructure(this: T,{ a, b }: {a: number,b: number}){returna+b;}
/** * Returns the sum of two numbers * @param options Object to destructure * @param options.a First value * @param options.b Second value * @returns Sum of a and b */functionsumDestructure(this: unknown,{ a, b }: {a: number,b: number}){returna+b;}
Environment
Node version: v18.16.0
ESLint version 8.46.0
eslint-plugin-jsdoc version: 48.0.2
The text was updated successfully, but these errors were encountered:
Expected behavior
No warning should be triggered when
this
param is accompanied by a destructured parameter.Actual behavior
A warning is triggered, implying that the
@param
for the destructured root is being referenced as a match forthis
Note: this warning does not trigger when the parameter following
this
is not destructured, or when@param
is explicitly provided forthis
, as in the following cases:ESLint Config
ESLint sample
Environment
eslint-plugin-jsdoc
version: 48.0.2The text was updated successfully, but these errors were encountered: