Title: In JS, any declaration with a non-primitive initializer should be a JS container · Issue #22637 · microsoft/TypeScript · GitHub
Open Graph Title: In JS, any declaration with a non-primitive initializer should be a JS container · Issue #22637 · microsoft/TypeScript
X Title: In JS, any declaration with a non-primitive initializer should be a JS container · Issue #22637 · microsoft/TypeScript
Description: // @noEmit: true // @allowJs: true // @checkJs: true // @Filename: a.js // from clear-require var clear = moduleId => 2 clear.all = () => 1 Expected behavior: all is a property on clear, and has the type () => number. Actual behavior: Er...
Open Graph Description: // @noEmit: true // @allowJs: true // @checkJs: true // @Filename: a.js // from clear-require var clear = moduleId => 2 clear.all = () => 1 Expected behavior: all is a property on clear, and has th...
X Description: // @noEmit: true // @allowJs: true // @checkJs: true // @Filename: a.js // from clear-require var clear = moduleId => 2 clear.all = () => 1 Expected behavior: all is a property on clear, and ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/22637
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"In JS, any declaration with a non-primitive initializer should be a JS container","articleBody":"```ts\r\n// @noEmit: true\r\n// @allowJs: true\r\n// @checkJs: true\r\n// @Filename: a.js\r\n// from clear-require\r\nvar clear = moduleId => 2\r\nclear.all = () => 1\r\n```\r\n\r\n**Expected behavior:**\r\n`all` is a property on `clear`, and has the type `() => number`.\r\n\r\n**Actual behavior:**\r\nError: 'all' is not a property on 'clear'.\r\n\r\nMaybe any top-level declaration with a non-primitive initialiser should create a container in Javascript, although that would be hard to verify in the binder.","author":{"url":"https://github.com/sandersn","@type":"Person","name":"sandersn"},"datePublished":"2018-03-16T15:48:59Z","url":"https://github.com/microsoft/TypeScript/issues/22637"}
| 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:c92bede0-6c4d-ba0a-1051-b7c5431cbc64 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C832:1C94F:21527C5:2AB580C:6B01BE7F |
| html-safe-nonce | 7240ae29b0d27104317f145637d445179f3a029f6479b756943a1201d0afa621 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODMyOjFDOTRGOjIxNTI3QzU6MkFCNTgwQzo2QjAxQkU3RiIsInZpc2l0b3JfaWQiOiI0MDExODI3MzI5NzY3Njg1NzU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e9d3946752a072e5e0ebebb2f0f7d145b1feadc2aedc38f94ce8794daa7aff6d |
| hovercard-subject-tag | issue:305979885 |
| 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/22637/issue_layout |
| twitter:image | https://opengraph.githubassets.com/34a5af6f4ff6ba7007259b0543f0464d70c2f4785f4eab8b5e18ec8dcdc5e334/microsoft/TypeScript/issues/22637 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/34a5af6f4ff6ba7007259b0543f0464d70c2f4785f4eab8b5e18ec8dcdc5e334/microsoft/TypeScript/issues/22637 |
| og:image:alt | // @noEmit: true // @allowJs: true // @checkJs: true // @Filename: a.js // from clear-require var clear = moduleId => 2 clear.all = () => 1 Expected behavior: all is a property on clear, and has th... |
| 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