Title: `{@link Class.name}` resolves wrongly to `Function.name` · Issue #61433 · microsoft/TypeScript · GitHub
Open Graph Title: `{@link Class.name}` resolves wrongly to `Function.name` · Issue #61433 · microsoft/TypeScript
X Title: `{@link Class.name}` resolves wrongly to `Function.name` · Issue #61433 · microsoft/TypeScript
Description: 🔎 Search Terms JSDoc, TSDoc, Link, Resolve, Name 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed the FAQ for entries ⏯ Playground Link https://www.typescriptlang.org/play/?ts=5.8.0-dev.202...
Open Graph Description: 🔎 Search Terms JSDoc, TSDoc, Link, Resolve, Name 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed the FAQ for entries ⏯ Playground Link https://www.t...
X Description: 🔎 Search Terms JSDoc, TSDoc, Link, Resolve, Name 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed the FAQ for entries ⏯ Playground Link https://w...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/61433
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`{@link Class.name}` resolves wrongly to `Function.name`","articleBody":"### 🔎 Search Terms\n\nJSDoc, TSDoc, Link, Resolve, Name\n\n### 🕗 Version & Regression Information\n\n- This is the behavior in every version I tried, and I reviewed the FAQ for entries\n\n\n### ⏯ Playground Link\n\nhttps://www.typescriptlang.org/play/?ts=5.8.0-dev.20250215#code/MYGwhgzhAEAqCmEAu0DeBYAUNH0D0AVAVrjgdABLwggD2JpBeDOAdmALbwBcyATgEtWAc2gBeaACIEySVgC+WLIWLZyqAAIghAaziIkAOnZdFa5pgBmAV1bAkA2q2hgAFEm4ykASjQtofPBI1nzORibwANwKQA\n\n### 💻 Code\n\n```ts\nclass Test {\n /**\n * Hello\n */\n name:string = \"Test\"\n}\n\n/**\n * {@link Test.name}\n */\nfunction a(t:Test) {\n return t.name;\n}\n```\n\n\n### 🙁 Actual behavior\n\nThe `Test.name` reference in the JSDoc/TSDoc resolves to the symbol `Function.name`. This is not correct because the `Test` class has an own property declaration for `name`.\n\nIn my real world usecase am generating markdowns from my typescript code via TypeScript compiler API and I get the wrong symbol using `typeChecker.getSymbolAtLocation(tsDocLinkNode.name)` leading to wrong documentation links.\n\n\n\n\n### 🙂 Expected behavior\n\nThe correct documentation of my `name` property should be shown. \n\nThe typeChecker should resolve this expression to the correct symbol to allow tooling to resolve these cross references and link to the respective documentation page. \n\n### Additional information about the issue\n\n_No response_","author":{"url":"https://github.com/Danielku15","@type":"Person","name":"Danielku15"},"datePublished":"2025-03-16T20:42:50Z","url":"https://github.com/microsoft/TypeScript/issues/61433"}
| 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:c8da9cbd-4274-1c8d-5141-144ac423fdae |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8ABE:37820D:C34973:105BE5A:6B00EB67 |
| html-safe-nonce | c5ca80c64b79ac6d75f28b78a91660a5d4fc676002dde9d956d529066f1624b0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUJFOjM3ODIwRDpDMzQ5NzM6MTA1QkU1QTo2QjAwRUI2NyIsInZpc2l0b3JfaWQiOiIxOTI2NDA5NDI1MjMzNDM5NTkxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ba6b7f36df2e9c57b1473511016068c1232879a3907bdfb4239a5f8fe021f69c |
| hovercard-subject-tag | issue:2923299148 |
| 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/61433/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f52f7dd587a1514cb12ac09e6f927b68c09c5a3c9497cb456861816919a090eb/microsoft/TypeScript/issues/61433 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f52f7dd587a1514cb12ac09e6f927b68c09c5a3c9497cb456861816919a090eb/microsoft/TypeScript/issues/61433 |
| og:image:alt | 🔎 Search Terms JSDoc, TSDoc, Link, Resolve, Name 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed the FAQ for entries ⏯ Playground Link https://www.t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Danielku15 |
| 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