Title: In JS, module.exports should support property assignments as declaration · Issue #22459 · microsoft/TypeScript · GitHub
Open Graph Title: In JS, module.exports should support property assignments as declaration · Issue #22459 · microsoft/TypeScript
X Title: In JS, module.exports should support property assignments as declaration · Issue #22459 · microsoft/TypeScript
Description: // @noEmit: true // @allowJs: true // @checkJs: true // @strict: true // @Filename: a.js // from debug var debug = module.exports = create.debug = create['default'] = create; function create() { function d() { var curr = +new Date() d.cu...
Open Graph Description: // @noEmit: true // @allowJs: true // @checkJs: true // @strict: true // @Filename: a.js // from debug var debug = module.exports = create.debug = create['default'] = create; function create() { fu...
X Description: // @noEmit: true // @allowJs: true // @checkJs: true // @strict: true // @Filename: a.js // from debug var debug = module.exports = create.debug = create['default'] = create; function creat...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/22459
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"In JS, module.exports should support property assignments as declaration","articleBody":"```ts\r\n// @noEmit: true\r\n// @allowJs: true\r\n// @checkJs: true\r\n// @strict: true\r\n// @Filename: a.js\r\n\r\n// from debug\r\nvar debug = module.exports = create.debug = create['default'] = create;\r\nfunction create() {\r\n function d() {\r\n var curr = +new Date()\r\n d.curr = curr\r\n }\r\n return d\r\n}\r\nfunction assert() {\r\n}\r\ndebug.assert = assert\r\n```\r\n\r\n**Expected behavior:**\r\nNo errors, and the `debug` module should have exports `{ debug, default, assert }` and also be callable.\r\n\r\n**Actual behavior:**\r\nLots of different errors, and no exported members. Moving the function `create` before the exports assignments adds the export `debug`, but that's it.","author":{"url":"https://github.com/sandersn","@type":"Person","name":"sandersn"},"datePublished":"2018-03-10T16:00:41Z","url":"https://github.com/microsoft/TypeScript/issues/22459"}
| 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:55135b6b-a008-663b-2633-a44a022ad29a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 985E:3C21B:2B080AA:36F8602:6B019EAA |
| html-safe-nonce | cb881d12729690144ed928df386b16b66523dcbe0bca625833fdc8952c235940 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODVFOjNDMjFCOjJCMDgwQUE6MzZGODYwMjo2QjAxOUVBQSIsInZpc2l0b3JfaWQiOiIxNTg5OTQ3MDE3MzE5MjU5ODE4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 463e762d1d16ac04acb0cbec5dc0cc5abb81c40e89c9a50a643b77edad013729 |
| hovercard-subject-tag | issue:304081442 |
| 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/22459/issue_layout |
| twitter:image | https://opengraph.githubassets.com/377018f0ff38d886d4d88bf90ce8d1badf56d09b16020db34265d62584715c77/microsoft/TypeScript/issues/22459 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/377018f0ff38d886d4d88bf90ce8d1badf56d09b16020db34265d62584715c77/microsoft/TypeScript/issues/22459 |
| og:image:alt | // @noEmit: true // @allowJs: true // @checkJs: true // @strict: true // @Filename: a.js // from debug var debug = module.exports = create.debug = create['default'] = create; function create() { fu... |
| 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 | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width