Title: Design Meeting Notes, 9/17/2024 · Issue #60283 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes, 9/17/2024 · Issue #60283 · microsoft/TypeScript
X Title: Design Meeting Notes, 9/17/2024 · Issue #60283 · microsoft/TypeScript
Description: Extension Rewriting #59767 We've discussed what we need to do with async imports. One possibility: you do the transform yourself. Another: we provide a runtime shim - possibly overridable. Also: we have the same situation for require cal...
Open Graph Description: Extension Rewriting #59767 We've discussed what we need to do with async imports. One possibility: you do the transform yourself. Another: we provide a runtime shim - possibly overridable. Also: we...
X Description: Extension Rewriting #59767 We've discussed what we need to do with async imports. One possibility: you do the transform yourself. Another: we provide a runtime shim - possibly overridable. Also...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/60283
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 9/17/2024","articleBody":"\n# Extension Rewriting\n\nhttps://github.com/microsoft/TypeScript/pull/59767\n\n* We've discussed what we need to do with async imports.\n * One possibility: you do the transform yourself.\n * Another: we provide a runtime shim - possibly overridable.\n* Also: we have the same situation for `require` calls in JS input files.\n * It is currently not as common, but possible, for us to transform JavaScript input files.\n * Those files can still refer to `.ts` files - do we want rewriting for those?\n* Does the experimental mode in Node support `require`?\n * *Pretty sure* it does?\n* There's `require` with a plain string and an arbitrary expression.\n * Why do we care about this difference?\n * `require` can be passed into arbitrary places.\n * Makes us inclined to say no shimming.\n* We could error on `require` of an arbitrary expression in this mode.\n * People can always alias `require` or `// @ts-ignore`.\n* Extension rewriting was always weird - but if we're gonna do it, maybe we should do it in a maximalist way?\n * Feels like if semantics diverges between runtime and emit, that's a problem.\n* Could just say only `require` on static imports.\n* Can you just create arbitrary `require`s?\n * Yes, there's `createRequire` - could maybe monkey-patch this?\n * Also `require.call(...)`\n* Could add an import attribute to turn off rewriting for `import()`.\n* Moved from \"don't shim anything\" to \"shim everything\".\n* Between import attributes and `(require)(...)` these are reasonable opt-outs.\n* Also open to just a global flag...\n* Or a third state for the flag.\n * `\"none\"`, `\"staticImportsOnly\"`, `\"bestEffort\"`?\n","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2024-10-18T23:03:13Z","url":"https://github.com/microsoft/TypeScript/issues/60283"}
| 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:8e791956-3b16-393a-02fa-e78bc054aa0d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 98FE:785A9:D22562:10B3F4C:6B010201 |
| html-safe-nonce | c56415ea1a233b4b3ca3ee3ae599c9f40864443b59e17d59bda94af6e98cc1db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEZFOjc4NUE5OkQyMjU2MjoxMEIzRjRDOjZCMDEwMjAxIiwidmlzaXRvcl9pZCI6IjkyMTQ5NjMzOTQ2Mjc1NjgxMjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1f8dbcd0d5392b3fea198100d201e00fc2375befc0308527df8186975893cb56 |
| hovercard-subject-tag | issue:2598527779 |
| 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/60283/issue_layout |
| twitter:image | https://opengraph.githubassets.com/54a1b95ebbb5f80e74539ce115d1ace571d2ea8e3e7b84a112e01579cb5dd19e/microsoft/TypeScript/issues/60283 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/54a1b95ebbb5f80e74539ce115d1ace571d2ea8e3e7b84a112e01579cb5dd19e/microsoft/TypeScript/issues/60283 |
| og:image:alt | Extension Rewriting #59767 We've discussed what we need to do with async imports. One possibility: you do the transform yourself. Another: we provide a runtime shim - possibly overridable. Also: we... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DanielRosenwasser |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width