-
Notifications
You must be signed in to change notification settings - Fork 734
Description
Extension Version
v0.20251107.1
VS Code Version
1.105.1
Also occurs when using TSGo with the Zed editor (extension version 0.0.3 and editor version 0.211.6), so it's likely not a VS Code impl issue.
Operating system Version
Ubuntu x86-64 (WSL, though I highly doubt this matters)
Steps to reproduce
Copy the following MRE into a new .ts file in the editor.
interface foo {
/** base jsdoc */
bar(k: string): number;
/** other jsdoc */
other: 24;
}
interface bar extends foo {
bar(k: string | symbol): number | 99;
}
declare class thing {
/** doc comment */
method(s: string): void;
}
declare class potato extends thing {
method(s: "1234"): void;
}
declare const f: foo;
declare const b: bar;
declare const t: thing;
declare const p: potato;
// b and p lack comments on the properties they overrode (`bar` and `method` respectively)
f.bar;
f.other;
b.bar;
b.other;
t.method;
p.method;Hover over the bottom 6 symbols and notice how b and p's overridden methods lack hover comments.
Issue
The interfaces and classes should inherit the parents' doc comments if they themself lack an accompanying JSDoc comment, as happens with normal tsc.
NB: This also occurs with classes implementing interfaces and interfaces extending classes.
Images
Playground = tsc, editor = tsgo
Remarks
Our codebase uses this feature a very large amount to avoid re-documenting interface properties on implementing classes, so a fix would be greatly appreciated.