Title: Design Meeting Notes, 6/2/2023 · Issue #54502 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes, 6/2/2023 · Issue #54502 · microsoft/TypeScript
X Title: Design Meeting Notes, 6/2/2023 · Issue #54502 · microsoft/TypeScript
Description: Import Assertions / Import Attributes #53656 #54242 import Resource from "./some-json-file.json" with { type: "json" }; import Resource from "./some-json-file.json" assert { type: "json" }; At last TC39, progressed conditionally - some p...
Open Graph Description: Import Assertions / Import Attributes #53656 #54242 import Resource from "./some-json-file.json" with { type: "json" }; import Resource from "./some-json-file.json" assert { type: "json" }; At last...
X Description: Import Assertions / Import Attributes #53656 #54242 import Resource from "./some-json-file.json" with { type: "json" }; import Resource from "./some-json-file.json" as...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/54502
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 6/2/2023","articleBody":"# Import Assertions / Import Attributes\r\n\r\nhttps://github.com/microsoft/TypeScript/issues/53656\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/54242\r\n\r\n```ts\r\nimport Resource from \"./some-json-file.json\" with { type: \"json\" };\r\n```\r\n\r\n```ts\r\nimport Resource from \"./some-json-file.json\" assert { type: \"json\" };\r\n```\r\n\r\n* At last TC39, progressed *conditionally* - some paperwork to be done.\r\n* Babel and at least one other implementer has it.\r\n* Node merged (shipped?) this already.\r\n* Probably safe - but we want concrete stage 3 to make sure.\r\n* Feels like we need confidence for at least syntax - should be able to use the `with` syntax instead of `assert` as soon as it hits stage 3.\r\n* But new semantics are tougher - this is a feature that is largely implementation defined. Unless we have a strong vision or the community coalesces on semantics, it is hard for us to figure out.\r\n* Will wait on true stage 3.\r\n\r\n# Plugins!\r\n\r\nhttps://github.com/microsoft/TypeScript/issues/16607\r\n\r\n* 3 things we've been talking a lot about\r\n * Watch plugins\r\n * Module resolution\r\n * Transformer (emit)\r\n* Also, module resolution has some asymmetry with the language service - generating a `.d.ts` on the fly for a GraphQL schema/query would mean you have to save a file on disk.\r\n * The most common thing is for CSS.\r\n * Ties into issues around the `System` interface expecting `string`s instead of binary buffers.\r\n * How do you map back an error span back to a binary?\r\n* Why did we start exploring transformer plugins?\r\n * Wanted people to stop patching TypeScript.\r\n * Patchers said they'd keep maintaining ts-patch.\r\n * Arguable that transformer plugins just fragment things more. esbuild, swc, Babel, Bun, Deno - none of them could leverage these transformers.\r\n * Feels like one of the concerns is type-driven emit, right?\r\n * Maybe, but also having parity mismatch is its own issue between all of these compilers.\r\n * People do use our output, but the marketplace for TypeScript compilers is broad.\r\n* Really what you'd want to do is describe how the code will be changed before it hits the checker.\r\n * e.g. transforms over a tagged template string to give better types\r\n * Mixed feelings about supporting that.\r\n * Lose invariants - need to know which kinds of nodes occur in the tree.\r\n * Could do a walk of the tree.\r\n * Really prefer having a source of truth on disk if possible (i.e. a `.d.ts` file or something)\r\n * \"Running\" things in the type system is slow and hits recursion limiters. Eventually might need to think about a way to enable these scenarios.\r\n* We probably would be best-served by splitting up the umbrella \"compiler plugins\" issue into 6 new issues so we can discuss them with some more clarity.\r\n * Watch\r\n * Transform\r\n * Resolution\r\n * Post-Execution (e.g. linting)\r\n * Post-parse\r\n * Mid-Check (?)\r\n * ...?\r\n","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2023-06-02T19:02:57Z","url":"https://github.com/microsoft/TypeScript/issues/54502"}
| 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:e65646a9-075f-9d22-98fc-9d8b63c58616 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E790:EDA7A:AFB105:E071F7:6B00F77A |
| html-safe-nonce | 90a7a10aee36c36dca1fa16a21c7e9f91dd23d0f30ecadb6e79b6dd9db79078d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzkwOkVEQTdBOkFGQjEwNTpFMDcxRjc6NkIwMEY3N0EiLCJ2aXNpdG9yX2lkIjoiOTA2MjMzMjY0MDk1MjEwMTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f7386420ea80bf8ecb9fc984392a57f7c1f0c56aabd9fc8bfa2fa795a6fb5f43 |
| hovercard-subject-tag | issue:1738670586 |
| 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/54502/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1dccf224354ba4e8eaa655ae07c7ddb70aaa24dc381d13abf225b7a7b14719f8/microsoft/TypeScript/issues/54502 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1dccf224354ba4e8eaa655ae07c7ddb70aaa24dc381d13abf225b7a7b14719f8/microsoft/TypeScript/issues/54502 |
| og:image:alt | Import Assertions / Import Attributes #53656 #54242 import Resource from "./some-json-file.json" with { type: "json" }; import Resource from "./some-json-file.json" assert { type: "json" }; At last... |
| 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 | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width