Title: typedef tag is able to resolve type variables declared in same jsdoc comment · Issue #23740 · microsoft/TypeScript · GitHub
Open Graph Title: typedef tag is able to resolve type variables declared in same jsdoc comment · Issue #23740 · microsoft/TypeScript
X Title: typedef tag is able to resolve type variables declared in same jsdoc comment · Issue #23740 · microsoft/TypeScript
Description: Typedef tags are supposed to be visible in the parent scope of the jsdoc comment they are attached to. That also means that they should not be able to see things in the same jsdoc comment that are supposed to be visible in the child scop...
Open Graph Description: Typedef tags are supposed to be visible in the parent scope of the jsdoc comment they are attached to. That also means that they should not be able to see things in the same jsdoc comment that are ...
X Description: Typedef tags are supposed to be visible in the parent scope of the jsdoc comment they are attached to. That also means that they should not be able to see things in the same jsdoc comment that are ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/23740
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"typedef tag is able to resolve type variables declared in same jsdoc comment","articleBody":"Typedef tags are supposed to be visible in the parent scope of the jsdoc comment they are attached to. That also means that they should not be able to see things in the same jsdoc comment that are supposed to be visible in the child scope, such as `@template`.\r\n\r\n```js\r\n/**\r\n * @template T\r\n * @typedef {T} N\r\n */\r\nclass C {\r\n /** @param {N} n */\r\n m(n) {\r\n n\r\n }\r\n}\r\n/** @type {N} */\r\nvar y;\r\n```\r\n\r\n**Expected behavior:**\r\n`n: T` and `y: unknown` with an error on `@type {N}` \"Cannot resolve name 'N'.\"\r\n\r\n**Actual behavior:**\r\n`n: T` and `y: T` and no error.","author":{"url":"https://github.com/sandersn","@type":"Person","name":"sandersn"},"datePublished":"2018-04-27T16:42:34Z","url":"https://github.com/microsoft/TypeScript/issues/23740"}
| 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:a8d1c2b7-3360-6ee9-c118-12969e363330 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F8C:19AA62:EF4AC2:1311752:6B010C30 |
| html-safe-nonce | f9ca7c3b004ceb5663dc6c9d2b09466cdb8678653362df18d4fb43130f6cf43b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjhDOjE5QUE2MjpFRjRBQzI6MTMxMTc1Mjo2QjAxMEMzMCIsInZpc2l0b3JfaWQiOiI1ODI2NDY5MTE1NjE0NzkyNzUzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 694d755e969264aaba9d6e236c89a947a35c8cc11d84a94e7025c1ae5a6d5dc2 |
| hovercard-subject-tag | issue:318476700 |
| 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/23740/issue_layout |
| twitter:image | https://opengraph.githubassets.com/763457941ed1b7419eaf9c1fa5143948aaa3663a65e2d0e99afcf938938cdfc7/microsoft/TypeScript/issues/23740 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/763457941ed1b7419eaf9c1fa5143948aaa3663a65e2d0e99afcf938938cdfc7/microsoft/TypeScript/issues/23740 |
| og:image:alt | Typedef tags are supposed to be visible in the parent scope of the jsdoc comment they are attached to. That also means that they should not be able to see things in the same jsdoc comment that are ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sandersn |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width