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
{{ message }}
Repository navigation
Native LS: JSDoc @this / @param types are any for hover & completions (checker OK) #65167
Same native LS hole for JSDoc @param types on JS function parameters: checker diagnostics see the type, but hover/completions treat the parameter as any.
changed the title [-]Native LS: no property completions on `this.` when type comes from JSDoc `@this`[/-][+]Native LS: JSDoc `@this` / `@param` types are `any` for hover & completions (checker OK)[/+]on Nov 3, 2026
Thanks for the detailed report. As far as I can tell this isn't an LS bug; the repro just isn't running in a JS file.
The fourslash snippets have @allowJs/@checkJs but no // @filename: /something.js, so the content isn't treated as JS. In TS files, JSDoc @this/@param types aren't used for typing, so this/p being any (and no member completions) is expected there.
With an explicit JS filename, everything in this issue and the follow-up comments already works on native main:
Hover on p shows (parameter) p: { name: string; }. I've added this as a fourslash regression test in #65307. Suggest closing as not a bug; please reopen if you can reproduce it with a real .js file in an editor.
Activity
timurzvural commentedon Nov 3, 2026
Broader than
@thisSame native LS hole for JSDoc
@paramtypes on JS function parameters: checker diagnostics see the type, but hover/completions treat the parameter asany.Native hover on
p:(parameter) p: anyClassic hover on
p:(parameter) p: { id: string; }Controls that work on native:
this/ parameter annotations@typeonconst/varwith an initializer (or assigned before use).jsSo the gap is specifically LS display/completions for types attached via JSDoc to parameters /
this, not all JSDoc typing.[-]Native LS: no property completions on `this.` when type comes from JSDoc `@this`[/-][+]Native LS: JSDoc `@this` / `@param` types are `any` for hover & completions (checker OK)[/+]timurzvural commentedon Nov 3, 2026
Also signature help
Call-site signature help for the same JSDoc-
@param-typed function showsanyparameters on native:f(a: string, b: number): voidf(a: any, b: any): void1-DARK commentedon Nov 4, 2026
Thanks for the detailed report. As far as I can tell this isn't an LS bug; the repro just isn't running in a JS file.
The fourslash snippets have
@allowJs/@checkJsbut no// @filename: /something.js, so the content isn't treated as JS. In TS files, JSDoc@this/@paramtypes aren't used for typing, sothis/pbeingany(and no member completions) is expected there.With an explicit JS filename, everything in this issue and the follow-up comments already works on native
main:Hover on
pshows(parameter) p: { name: string; }. I've added this as a fourslash regression test in #65307. Suggest closing as not a bug; please reopen if you can reproduce it with a real.jsfile in an editor.