Title: TS 4.1 should support `require` with nested binding patterns · Issue #40143 · microsoft/TypeScript · GitHub
Open Graph Title: TS 4.1 should support `require` with nested binding patterns · Issue #40143 · microsoft/TypeScript
X Title: TS 4.1 should support `require` with nested binding patterns · Issue #40143 · microsoft/TypeScript
Description: prettier uses nested binding patterns to import multiple things from "namespaces": Code const { builders: { concat, join }, utils: { nub, intercalate } } = require('../document') (Identifier names have been changed to make fun of Haskell...
Open Graph Description: prettier uses nested binding patterns to import multiple things from "namespaces": Code const { builders: { concat, join }, utils: { nub, intercalate } } = require('../document') (Identifier names ...
X Description: prettier uses nested binding patterns to import multiple things from "namespaces": Code const { builders: { concat, join }, utils: { nub, intercalate } } = require('../document') ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/40143
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TS 4.1 should support `require` with nested binding patterns","articleBody":"prettier uses nested binding patterns to import multiple things from \"namespaces\":\r\n\r\n**Code**\r\n\r\n```js\r\nconst {\r\n builders: {\r\n concat,\r\n join\r\n },\r\n utils: {\r\n nub,\r\n intercalate\r\n }\r\n} = require('../document')\r\n```\r\n\r\n(Identifier names have been changed to make fun of Haskell.)\r\n\r\n**Expected behavior:**\r\n\r\n`nub :: Eq a => [a] -> [a]`\r\n\r\n**Actual behavior:**\r\n\r\nerror \"Module '../document' has no exported member 'nub'.\", and `nub: any`. \r\n\r\nThis worked before switching `const x = require` to create real aliases, and needs to work afterwards.","author":{"url":"https://github.com/sandersn","@type":"Person","name":"sandersn"},"datePublished":"2020-08-19T23:38:24Z","url":"https://github.com/microsoft/TypeScript/issues/40143"}
| 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:5500ecd8-49f8-3fbf-f902-bed41c8635fd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CAC8:CC1A4:2E87A9C:3B31589:6B01BCD5 |
| html-safe-nonce | ad131674331213a6e45618b8418b5ae4dadbe786b472b6d6070433f801e4c7fc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUM4OkNDMUE0OjJFODdBOUM6M0IzMTU4OTo2QjAxQkNENSIsInZpc2l0b3JfaWQiOiIxOTk3ODIyNTI1MDY4OTE3OTczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 43c274f4a14e87d8451364577f2f3647d9444b445d04813c41dc3a628461f68e |
| hovercard-subject-tag | issue:682249814 |
| 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/40143/issue_layout |
| twitter:image | https://opengraph.githubassets.com/56eb9afecdede0640632ebe0104b0127175e55e5ca8fa0edbef201fd4037be3b/microsoft/TypeScript/issues/40143 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/56eb9afecdede0640632ebe0104b0127175e55e5ca8fa0edbef201fd4037be3b/microsoft/TypeScript/issues/40143 |
| og:image:alt | prettier uses nested binding patterns to import multiple things from "namespaces": Code const { builders: { concat, join }, utils: { nub, intercalate } } = require('../document') (Identifier names ... |
| 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