Title: jsdoc @enum with import/export · Issue #33575 · microsoft/TypeScript · GitHub
Open Graph Title: jsdoc @enum with import/export · Issue #33575 · microsoft/TypeScript
X Title: jsdoc @enum with import/export · Issue #33575 · microsoft/TypeScript
Description: TypeScript Version: 3.6.3 Code This works: /** @enum {number} */ const MyEnum = { a: 1, b: 2 }; /** @type {MyEnum} */ const v = MyEnum.b; This doesn't work (MyEnum imported from separate file): // my-enum.js /** @enum {number} */ const M...
Open Graph Description: TypeScript Version: 3.6.3 Code This works: /** @enum {number} */ const MyEnum = { a: 1, b: 2 }; /** @type {MyEnum} */ const v = MyEnum.b; This doesn't work (MyEnum imported from separate file): // ...
X Description: TypeScript Version: 3.6.3 Code This works: /** @enum {number} */ const MyEnum = { a: 1, b: 2 }; /** @type {MyEnum} */ const v = MyEnum.b; This doesn't work (MyEnum imported from separate file):...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/33575
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"jsdoc @enum with import/export","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 3.6.3\r\n\r\n**Code**\r\n\r\nThis works:\r\n```ts\r\n/** @enum {number} */\r\nconst MyEnum = {\r\n a: 1,\r\n b: 2\r\n};\r\n\r\n/** @type {MyEnum} */\r\nconst v = MyEnum.b;\r\n```\r\n\r\nThis doesn't work (`MyEnum` imported from separate file):\r\n```ts\r\n\r\n// my-enum.js\r\n\r\n/** @enum {number} */\r\nconst MyEnum = {\r\n a: 1,\r\n b: 2\r\n};\r\n\r\nexport default MyEnum;\r\n\r\n// main.js\r\n\r\nimport MyEnum from './my-enum.js';\r\n\r\n/** @type {MyEnum} */ // ERROR: 'MyEnum' refers to a value, but is being used as a type here. ts(2749)\r\nconst v = MyEnum.b;\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nNo type errors.\r\n\r\nIt did work fine in v2.8.3","author":{"url":"https://github.com/art-in","@type":"Person","name":"art-in"},"datePublished":"2019-09-24T11:50:34Z","url":"https://github.com/microsoft/TypeScript/issues/33575"}
| 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:da13057b-46d3-48c2-84db-8b391fcec88c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F52:34DB8F:23F88D5:3019F25:6B01A226 |
| html-safe-nonce | 2e0473c9bf189c389b0889d42497a49854209d2122b028ac49cc8ca2cb9d5010 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjUyOjM0REI4RjoyM0Y4OEQ1OjMwMTlGMjU6NkIwMUEyMjYiLCJ2aXNpdG9yX2lkIjoiNTUwNDA1Mzc4OTA4NDE5NzQxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3b2b98e1444a0ec5f67e475260bc85cd32c1b251d1b65d81242116da95527b9d |
| hovercard-subject-tag | issue:497638002 |
| 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/33575/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4e6658880719a0e871f923452485ede5beda37143fa9af042fb3b65d492cb49a/microsoft/TypeScript/issues/33575 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4e6658880719a0e871f923452485ede5beda37143fa9af042fb3b65d492cb49a/microsoft/TypeScript/issues/33575 |
| og:image:alt | TypeScript Version: 3.6.3 Code This works: /** @enum {number} */ const MyEnum = { a: 1, b: 2 }; /** @type {MyEnum} */ const v = MyEnum.b; This doesn't work (MyEnum imported from separate file): // ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | art-in |
| 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