Title: Native LS: JSDoc `@this` / `@param` types are `any` for hover & completions (checker OK) · Issue #65167 · microsoft/TypeScript · GitHub
Open Graph Title: Native LS: JSDoc `@this` / `@param` types are `any` for hover & completions (checker OK) · Issue #65167 · microsoft/TypeScript
X Title: Native LS: JSDoc `@this` / `@param` types are `any` for hover & completions (checker OK) · Issue #65167 · microsoft/TypeScript
Description: 🔎 Search Terms JSDoc Sajith Ariyarathna (@this), completions, this., checkJs, getCompletionsAtPosition, contextual this 🕗 Version & Regression Information Classic typescript@6.0.3 language service: completions on this. inside a JSDoc-@th...
Open Graph Description: 🔎 Search Terms JSDoc Sajith Ariyarathna (@this), completions, this., checkJs, getCompletionsAtPosition, contextual this 🕗 Version & Regression Information Classic typescript@6.0.3 language service:...
X Description: 🔎 Search Terms JSDoc Sajith Ariyarathna (@this), completions, this., checkJs, getCompletionsAtPosition, contextual this 🕗 Version & Regression Information Classic typescript@6.0.3 language serv...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/65167
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Native LS: JSDoc `@this` / `@param` types are `any` for hover & completions (checker OK)","articleBody":"### 🔎 Search Terms\n\nJSDoc @this, completions, this., checkJs, getCompletionsAtPosition, contextual this\n\n### 🕗 Version & Regression Information\n\n- Classic `typescript@6.0.3` language service: completions on `this.` inside a JSDoc-`@this`-annotated function list the annotated members\n- Native LS on current `main` (`7.1.0-dev`): **no completion list** (`nil` / empty) at the same position\n- Checker still applies `@this` correctly (e.g. `this.missing` → TS2339); only completions are broken\n- Control: the equivalent TypeScript `this` parameter form works on native\n\n### 💻 Code\n\n```js\n// @allowJs: true\n// @checkJs: true\n/**\n * @this {{ id: string, click: () => void }}\n * @param {string} ev\n */\nfunction h(ev) {\n this./*completions here*/\n}\n```\n\nAlso fails with DOM types:\n\n```js\n// @lib: dom,es2020\n/**\n * @this {HTMLElement}\n */\nfunction h() {\n this./*completions here*/\n}\n```\n\nWorking native control (TS `this` param):\n\n```ts\nfunction h(this: { id: string, click: () => void }, ev: string) {\n this./*id, click offered*/\n}\n```\n\nChecker still sees the `@this` type:\n\n```js\n/**\n * @this {{ id: string, click: () => void }}\n */\nfunction h() {\n this.missing; // native + classic: TS2339\n}\n```\n\n### Classic LS (6.0.3)\n\n```js\n// getCompletionsAtPosition after `this.`\nentries: ['click', 'id']\n```\n\n### Native LS\n\nFourslash `VerifyCompletions` at the `this.` marker: **Expected completion list but got nil.**\n\n### Expected behavior\n\nSame as classic / same as a TS `this` parameter: offer `id`, `click` (or `HTMLElement` members).\n\n### Notes\n\nDistinct from documentation API divergence (#64919) and from inlay/signature trailing-rest issues (#65162/#65165).","author":{"url":"https://github.com/timurzvural","@type":"Person","name":"timurzvural"},"datePublished":"2026-11-03T10:33:15Z","url":"https://github.com/microsoft/TypeScript/issues/65167"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:59b9303a-dc59-959d-9cdb-94a97ad71308 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9B04:34CAB:85593B:AB4ECD:6B00EBB9 |
| html-safe-nonce | 20e4a8fef47a4bb5eb9225ea674cd4cd5392968a798343db5603270ca9087618 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjA0OjM0Q0FCOjg1NTkzQjpBQjRFQ0Q6NkIwMEVCQjkiLCJ2aXNpdG9yX2lkIjoiOTU1NjI5Mjc1OTY3NDUwMDQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 048190b01ecc62b42ed80b67a08d05b342d8de54d2f4fdf94af933e650bff3f4 |
| hovercard-subject-tag | issue:6180791581 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/65167/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1b22ccc21cfbd8d82a30876d7a33b429ede3519352338ff12b9b5575e79b352f/microsoft/TypeScript/issues/65167 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1b22ccc21cfbd8d82a30876d7a33b429ede3519352338ff12b9b5575e79b352f/microsoft/TypeScript/issues/65167 |
| og:image:alt | 🔎 Search Terms JSDoc Sajith Ariyarathna (@this), completions, this., checkJs, getCompletionsAtPosition, contextual this 🕗 Version & Regression Information Classic typescript@6.0.3 language service:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | timurzvural |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width