Title: In JS, typedefs should be automatically exported · Issue #23692 · microsoft/TypeScript · GitHub
Open Graph Title: In JS, typedefs should be automatically exported · Issue #23692 · microsoft/TypeScript
X Title: In JS, typedefs should be automatically exported · Issue #23692 · microsoft/TypeScript
Description: // @Filename: module.js /** @typedef {number} Num */ module.exports = { a: 1 } // @Filename: use.js /** @type {import("./module.js").Num} */ var n; Expected: Num is visible in use.js Actual: Num is not visible. Note that the checker alre...
Open Graph Description: // @Filename: module.js /** @typedef {number} Num */ module.exports = { a: 1 } // @Filename: use.js /** @type {import("./module.js").Num} */ var n; Expected: Num is visible in use.js Actual: Num is...
X Description: // @Filename: module.js /** @typedef {number} Num */ module.exports = { a: 1 } // @Filename: use.js /** @type {import("./module.js").Num} */ var n; Expected: Num is visible in use.js Actu...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/23692
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"In JS, typedefs should be automatically exported","articleBody":"```js\r\n// @Filename: module.js\r\n/** @typedef {number} Num */\r\nmodule.exports = { a: 1 }\r\n\r\n// @Filename: use.js\r\n/** @type {import(\"./module.js\").Num} */\r\nvar n;\r\n```\r\n\r\nExpected:\r\nNum is visible in use.js\r\n\r\nActual:\r\nNum is not visible.\r\n\r\nNote that the checker already has code to handle structures like this, so modules with `modules.exports=` should already almost work. Other kinds of modules may or may not.\r\n\r\nThe special-case merge code for `module.exports=` in the checker puts SymbolFlags.Value on all the symbols, which will be incorrect for this case, so that code will need to be updated.","author":{"url":"https://github.com/sandersn","@type":"Person","name":"sandersn"},"datePublished":"2018-04-25T22:22:01Z","url":"https://github.com/microsoft/TypeScript/issues/23692"}
| 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:8120e0e7-57ef-203e-82cd-0fb5c6db42b5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B71A:14ECB:2B3D185:36FD7B4:6B01AE01 |
| html-safe-nonce | a141e29037160fc147270cadedef291028e44242e42a0ec87280498f156bf7e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzFBOjE0RUNCOjJCM0QxODU6MzZGRDdCNDo2QjAxQUUwMSIsInZpc2l0b3JfaWQiOiI3Mzc3Mzg3NDI0MDE3NjU3MzQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 38f061a2897f5ee770f89e20c5a2e6f84b6726d64f5ba68b44b4689afbfc6090 |
| hovercard-subject-tag | issue:317814523 |
| 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/23692/issue_layout |
| twitter:image | https://opengraph.githubassets.com/da64d1e2786831f21b132fa5f2e6e7a629c5223850612ce7511774578ed33b3e/microsoft/TypeScript/issues/23692 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/da64d1e2786831f21b132fa5f2e6e7a629c5223850612ce7511774578ed33b3e/microsoft/TypeScript/issues/23692 |
| og:image:alt | // @Filename: module.js /** @typedef {number} Num */ module.exports = { a: 1 } // @Filename: use.js /** @type {import("./module.js").Num} */ var n; Expected: Num is visible in use.js Actual: Num is... |
| 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 | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width