Title: Design Meeting Notes, 5/21/2020 · Issue #38713 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes, 5/21/2020 · Issue #38713 · microsoft/TypeScript
X Title: Design Meeting Notes, 5/21/2020 · Issue #38713 · microsoft/TypeScript
Description: Always Emit export {} #38696 What does "always" mean? If there were import/export statements in the file, there must at least be one import or export in the output. We already have this rule in declaration files. We just don't do it in m...
Open Graph Description: Always Emit export {} #38696 What does "always" mean? If there were import/export statements in the file, there must at least be one import or export in the output. We already have this rule in dec...
X Description: Always Emit export {} #38696 What does "always" mean? If there were import/export statements in the file, there must at least be one import or export in the output. We already have this r...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/38713
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 5/21/2020","articleBody":"# Always Emit `export {}`\r\n\r\nhttps://github.com/microsoft/TypeScript/issues/38696\r\n\r\n* What does \"always\" mean?\r\n* If there were import/export statements in the file, there must at least be one import or export in the output.\r\n* We already have this rule in declaration files.\r\n * We just don't do it in module output.\r\n * We probably do.\r\n* This is valuable for tools like Webpack/TypeScript, but there's a class of users who won't want this.\r\n * They will have a point.\r\n* Conclusion\r\n * Add the `export {}`.\r\n * Do we need a patch release?\r\n * Sounds like no.\r\n * https://github.com/microsoft/TypeScript/pull/38712\r\n\r\n# Optimization hints on classes\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/38602\r\nhttps://github.com/microsoft/TypeScript/pull/38566\r\n\r\nIn 3.9 we started emitting an IIFE around classes with statics when targeting ES2015.\r\n\r\n```ts\r\nclass C {\r\n static x = someExpression();\r\n}\r\n```\r\n\r\nBecomes\r\n\r\n```js\r\nlet C = /** @class */ (() => {\r\n class C {\r\n }\r\n C.x = someExpression();\r\n});\r\n```\r\n\r\nClosure can't understand this output.\r\n\r\nhttps://www.hyrumslaw.com/\r\n\r\n* Why are we emitting the noise *anywhere*?\r\n * https://github.com/microsoft/TypeScript/issues/16414\r\n * Exacerbated by https://github.com/microsoft/TypeScript/pull/32011\r\n* Shouldn't classes be *used*? Sounds like it should've been a dead-code elimination problem.\r\n * Bundlers not always good at tree-shaking.\r\n* Want to give the option, but maybe the default should be nice output.\r\n* Conclusion: ask more about the current issues, understand the problem better.\r\n\r\n# Allow modules to implement interfaces\r\n\r\nhttps://github.com/microsoft/TypeScript/issues/420\r\n\r\n* What about contextual typing and inference on the members?\r\n * We already have that on values in general, don't co-mingle that.\r\n * https://github.com/microsoft/TypeScript/issues/7481\r\n* What about being able to validate that types are present?\r\n * Now you need to have meta-typed module system.\r\n* Most people seem to just want to validate the types. \r\n* What are the wins?\r\n * React Native platform-specific modules.\r\n * Config files\r\n * https://github.com/microsoft/TypeScript/issues/420#issuecomment-629853785\r\n * https://github.com/microsoft/vscode-eslint/issues/124\r\n * Needs JSDoc support then.\r\n * Plugin Systems\r\n * Mocking in Tests\r\n* Maybe the syntax might differ depending on module type.\r\n* Could imagine there's just a design-time check for type compatibility.\r\n * Assert a value or type conforms to some other type.\r\n* Problems\r\n * The syntax space isn't fleshed out\r\n * There's a lot of adjacent proposals\r\n * There's no way to make this check things other than modules.\r\n","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2020-05-21T19:09:16Z","url":"https://github.com/microsoft/TypeScript/issues/38713"}
| 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:9dafadd1-fd34-9ff8-02bc-674bbd97973d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF68:2A5566:1F8FD:28CB3:6B017E1F |
| html-safe-nonce | cfc9245744e5db13e79c9cae6428dddaf180244fdbfdd1525c19e5170a8e963f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjY4OjJBNTU2NjoxRjhGRDoyOENCMzo2QjAxN0UxRiIsInZpc2l0b3JfaWQiOiIzMTcwMjQ0MTQyMjQ5NzMzNDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 94dc48648f8cc6d5144aa93d51f201253e6198af405e66ec01c3168e9b088960 |
| hovercard-subject-tag | issue:622717035 |
| 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/38713/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3bbfbb1cd53ff39499c5d852d20514975cd3397577931a4ca482bed7d13b04cd/microsoft/TypeScript/issues/38713 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3bbfbb1cd53ff39499c5d852d20514975cd3397577931a4ca482bed7d13b04cd/microsoft/TypeScript/issues/38713 |
| og:image:alt | Always Emit export {} #38696 What does "always" mean? If there were import/export statements in the file, there must at least be one import or export in the output. We already have this rule in dec... |
| 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 | 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