Title: In JS, aliasing `exports = {}` omits the expected string index signature · Issue #25687 · microsoft/TypeScript · GitHub
Open Graph Title: In JS, aliasing `exports = {}` omits the expected string index signature · Issue #25687 · microsoft/TypeScript
X Title: In JS, aliasing `exports = {}` omits the expected string index signature · Issue #25687 · microsoft/TypeScript
Description: From adonis-framework in the user tests. // Filename: util.js const util = exports = module.exports = {} util.existy = function() { } Expected behavior: No error, and import('util') has a property existy. (Ideally util would also have a ...
Open Graph Description: From adonis-framework in the user tests. // Filename: util.js const util = exports = module.exports = {} util.existy = function() { } Expected behavior: No error, and import('util') has a property ...
X Description: From adonis-framework in the user tests. // Filename: util.js const util = exports = module.exports = {} util.existy = function() { } Expected behavior: No error, and import('util') has a p...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/25687
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"In JS, aliasing `exports = {}` omits the expected string index signature","articleBody":"From adonis-framework in the user tests.\r\n\r\n```js\r\n// Filename: util.js\r\nconst util = exports = module.exports = {}\r\nutil.existy = function() { }\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nNo error, and `import('util')` has a property `existy`. (Ideally `util` would also have a property `existy` inside util.js, but this is not true in 2.9.2 either.)\r\n\r\n**Actual behavior:**\r\n\r\nError: Property 'x' does not exist on type '{}', but `require('util')` **does** have a property `existy: () => void`.","author":{"url":"https://github.com/sandersn","@type":"Person","name":"sandersn"},"datePublished":"2018-07-16T15:44:20Z","url":"https://github.com/microsoft/TypeScript/issues/25687"}
| 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:bb109a95-f389-b410-f6a0-d4d234e4f80e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A008:785A9:2A501C7:35B9906:6B01A7DA |
| html-safe-nonce | 0b782dc2e02e74b338c7725460368461318de335c1def221891e223fc915de94 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDA4Ojc4NUE5OjJBNTAxQzc6MzVCOTkwNjo2QjAxQTdEQSIsInZpc2l0b3JfaWQiOiI2NDQ2MDMxNDQwOTg2NjEzNzIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 80a8289df0813da8bb630c822eb6eabf233e2b46c35c9da2783d40ba2ba2f167 |
| hovercard-subject-tag | issue:341573427 |
| 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/25687/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c11f4188fefd21f4b28b2f2a98ba37339a6d42f616013eaa6d5ce16068eb3b4d/microsoft/TypeScript/issues/25687 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c11f4188fefd21f4b28b2f2a98ba37339a6d42f616013eaa6d5ce16068eb3b4d/microsoft/TypeScript/issues/25687 |
| og:image:alt | From adonis-framework in the user tests. // Filename: util.js const util = exports = module.exports = {} util.existy = function() { } Expected behavior: No error, and import('util') has a property ... |
| 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