Title: Should create unique symbols when creating properties on `module.exports` · Issue #37404 · microsoft/TypeScript · GitHub
Open Graph Title: Should create unique symbols when creating properties on `module.exports` · Issue #37404 · microsoft/TypeScript
X Title: Should create unique symbols when creating properties on `module.exports` · Issue #37404 · microsoft/TypeScript
Description: TypeScript Version: 3.9.0-dev.20200315 Search Terms: module.exports unique symbol property module.exports unique symbol exports unique symbol property exports unique symbol Code // @target: ES2015 // @module: CommonJS // @allowJs // @che...
Open Graph Description: TypeScript Version: 3.9.0-dev.20200315 Search Terms: module.exports unique symbol property module.exports unique symbol exports unique symbol property exports unique symbol Code // @target: ES2015 ...
X Description: TypeScript Version: 3.9.0-dev.20200315 Search Terms: module.exports unique symbol property module.exports unique symbol exports unique symbol property exports unique symbol Code // @target: ES2015 ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/37404
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Should create unique symbols when creating properties on `module.exports`","articleBody":"## TypeScript Version:\r\n`3.9.0-dev.20200315`\r\n\r\n## Search Terms:\r\n- module.exports unique symbol property\r\n- module.exports unique symbol\r\n- exports unique symbol property\r\n- exports unique symbol\r\n\r\n## Code\r\n```ts repro\r\n// @target: ES2015\r\n// @module: CommonJS\r\n// @allowJs\r\n// @checkJs\r\n// @noEmit\r\n// @filename: index.js\r\n\r\nexports.customSymbol = Symbol(\"custom\");\r\n// ^?\r\n```\r\n\r\n[Workbench Repro](https://www.typescriptlang.org/dev/bug-workbench/?checkJs=true&allowJs=true&target=2&module=1&noEmit=true#code/PTAEAEBcEMCcHMCmkBcoCiBlATABgIwCsAUCBALYD2AJgK4A2iaAwpeVQHYBSmpY40evUoB3LgGc+EAMYALRNIDWEqeA6V05AJaRVAMy2MO0ck1BaO1RAA8AdACtJxGwAdKsSONvTa4yG0wAT3IAI0p6UABeUCDQ8IAKACIfPzZEgEoAbilQXLz8goA9AH5iIA)\r\n\r\n## Expected behavior:\r\n```ts\r\n// some-module.d.ts\r\nexport const customSymbol: unique symbol;\r\n```\r\n\r\n## Actual behavior:\r\n```ts\r\n// some-module.d.ts\r\nexport var customSymbol: symbol;\r\n```\r\n\r\n## Playground Link:\r\nhttps://www.typescriptlang.org/play?module=1&useJavaScript=true#code/KYDwDg9gTgLgzgOgMYFc4wgWwMoE9MBGEANgAQC8pehJAFAESrpb0CUA3AFBA\r\n\r\n## Related Issues:\r\n- \u003chttps://github.com/microsoft/TypeScript/issues/37403>\r\n","author":{"url":"https://github.com/ExE-Boss","@type":"Person","name":"ExE-Boss"},"datePublished":"2020-03-15T13:55:57Z","url":"https://github.com/microsoft/TypeScript/issues/37404"}
| 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:31f711e4-76c5-2116-7a0e-ecb001f60e8d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D708:3E4205:979F76:CC7AC9:6B00EA13 |
| html-safe-nonce | 36cdeb2f7b01481f382486f165e695ba28c2f23cdea585ae1b83cde027d131a6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzA4OjNFNDIwNTo5NzlGNzY6Q0M3QUM5OjZCMDBFQTEzIiwidmlzaXRvcl9pZCI6IjM2MTk4NzM0MzMyODc5Nzc0OTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c41ba6fe116e7221ae74f4185e156c81e7a456ffd8caad1607a2789bbc18574a |
| hovercard-subject-tag | issue:581684585 |
| 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/37404/issue_layout |
| twitter:image | https://opengraph.githubassets.com/73da68eabaebf278a123200f24ad07ff173e35ab3acef94acd72eb6da3241fc2/microsoft/TypeScript/issues/37404 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/73da68eabaebf278a123200f24ad07ff173e35ab3acef94acd72eb6da3241fc2/microsoft/TypeScript/issues/37404 |
| og:image:alt | TypeScript Version: 3.9.0-dev.20200315 Search Terms: module.exports unique symbol property module.exports unique symbol exports unique symbol property exports unique symbol Code // @target: ES2015 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ExE-Boss |
| 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