Closed
Description
Bug Report
π Search Terms
typescript jsdoc declaration override method property signature
π Version & Regression Information
- This changed between versions 3.8.3 and 3.9.7.
β― Playground Link
π» Code
/**
* @typedef A
* @property {string} a
*/
/**
* @typedef B
* @property {number} b
*/
class Base {
/**
* @type {A}
*/
value;
}
class Test extends Base {
/**
* @type {A & B}
*/
value;
}
π Actual behavior
The declaration file does not contain a typing for the narrower type for value in class Test.
declare class Test extends Base {
}
π Expected behavior
The declaration file should contain the narrower type for value.
declare class Test extends Base {
/**
* @type {A & B}
*/
value: A & B;
}