Title: In JS, both module.exports assignments and property assignments should be allowed in a single file · Issue #22461 · microsoft/TypeScript · GitHub
Open Graph Title: In JS, both module.exports assignments and property assignments should be allowed in a single file · Issue #22461 · microsoft/TypeScript
X Title: In JS, both module.exports assignments and property assignments should be allowed in a single file · Issue #22461 · microsoft/TypeScript
Description: Code // @noEmit: true // @allowJs: true // @checkJs: true // @Filename: a.js // modified from graceful-fs module.exports = patch module.exports.close = function (fs$close) { } function patch(fs) { // do something with Fs } Expected behav...
Open Graph Description: Code // @noEmit: true // @allowJs: true // @checkJs: true // @Filename: a.js // modified from graceful-fs module.exports = patch module.exports.close = function (fs$close) { } function patch(fs) { ...
X Description: Code // @noEmit: true // @allowJs: true // @checkJs: true // @Filename: a.js // modified from graceful-fs module.exports = patch module.exports.close = function (fs$close) { } function patch(fs) { ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/22461
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"In JS, both module.exports assignments and property assignments should be allowed in a single file","articleBody":"\r\n**Code**\r\n\r\n```ts\r\n// @noEmit: true\r\n// @allowJs: true\r\n// @checkJs: true\r\n// @Filename: a.js\r\n\r\n// modified from graceful-fs\r\nmodule.exports = patch\r\nmodule.exports.close = function (fs$close) {\r\n}\r\nfunction patch(fs) {\r\n // do something with Fs\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\nNo errors, and graceful-fs creates a callable module with an exported member `patch`.\r\n\r\n**Actual behavior:**\r\nLots of errors, and no exported member `patch`.\r\n","author":{"url":"https://github.com/sandersn","@type":"Person","name":"sandersn"},"datePublished":"2018-03-10T16:09:09Z","url":"https://github.com/microsoft/TypeScript/issues/22461"}
| 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:a17410f1-3258-3284-3283-886184cd7f67 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8BB8:6DC60:1A5E307:21327B1:6B0181C6 |
| html-safe-nonce | b1917904f30bde7eead3e1cd0523c23e34b39c79dd80b34618bc357eb2e8182a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QkI4OjZEQzYwOjFBNUUzMDc6MjEzMjdCMTo2QjAxODFDNiIsInZpc2l0b3JfaWQiOiI4NzEzNjU2Mzc1MjA2NTc2NTgyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bb5cac95fc57beff7ee03ce6e09e6a9b0bb6157f4c284df3dabc92ac4a2a261d |
| hovercard-subject-tag | issue:304082064 |
| 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/22461/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ec3b3aee5f53b6014940e563fde7c862123209486607f6678a547f976c916dc1/microsoft/TypeScript/issues/22461 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ec3b3aee5f53b6014940e563fde7c862123209486607f6678a547f976c916dc1/microsoft/TypeScript/issues/22461 |
| og:image:alt | Code // @noEmit: true // @allowJs: true // @checkJs: true // @Filename: a.js // modified from graceful-fs module.exports = patch module.exports.close = function (fs$close) { } function patch(fs) { ... |
| 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