René's URL Explorer Experiment


Title: Import Attributes (Stage 3) · Issue #53656 · microsoft/TypeScript · GitHub

Open Graph Title: Import Attributes (Stage 3) · Issue #53656 · microsoft/TypeScript

X Title: Import Attributes (Stage 3) · Issue #53656 · microsoft/TypeScript

Description: Suggestion 🔍 Search Terms import attributes, import assertions, esnext ✅ Viability Checklist My suggestion meets these guidelines: This wouldn't be a breaking change in existing TypeScript/JavaScript code This wouldn't change the runtime...

Open Graph Description: Suggestion 🔍 Search Terms import attributes, import assertions, esnext ✅ Viability Checklist My suggestion meets these guidelines: This wouldn't be a breaking change in existing TypeScript/JavaScri...

X Description: Suggestion 🔍 Search Terms import attributes, import assertions, esnext ✅ Viability Checklist My suggestion meets these guidelines: This wouldn't be a breaking change in existing TypeScript/Java...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/53656

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Import Attributes (Stage 3)","articleBody":"# Suggestion\r\n\r\n## 🔍 Search Terms\r\n\r\nimport attributes, import assertions, esnext\r\n\r\n## ✅ Viability Checklist\r\n\r\n\u003c!--\r\n   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.\r\n   We always recommend reviewing the TypeScript design goals before investing time writing\r\n   a proposal for ideas outside the scope of the project.\r\n-->\r\nMy suggestion meets these guidelines:\r\n\r\n* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code\r\n* [x] This wouldn't change the runtime behavior of existing JavaScript code\r\n* [x] This could be implemented without emitting different JS based on the types of the expressions\r\n* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)\r\n* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).\r\n\r\n## ⭐ Suggestion\r\n\r\nhttps://github.com/tc39/proposal-import-attributes\r\n\r\nIn January 2023, Import Assertions proposal was demoted back to Stage 2 to investigate a solution for the web platform's needs. In March 2023, the proposal was renamed to Import Attributes and moved back to Stage 3 (with conditional consensus - pending spec text review).\r\n\r\nTypeScript should support the new syntax. The most relevant change for TypeScript is that the keyword changed from `assert` to `with`.\r\n\r\n```ts\r\nimport json from \"./foo.json\" with { type: \"json\" };\r\n\r\nimport(\"foo.json\", { with: { type: \"json\" } });\r\n\r\nexport { val } from './foo.js' with { type: \"javascript\" };\r\n```\r\n\r\nThe minimal option here is just to add the `with` syntax. Ideally there would also be two enhancements:\r\n\r\n* **Deprecating `assert`:** For compatibility with existing implementations, the `assert` keyword is still allowed by the spec until it's safe to remove it. Chrome will explore removing it.  Babel [is deprecating the syntax with a plan to eventually remove it in Babel 8](https://github.com/babel/babel/pull/15536). TypeScript could follow something similar to [the 5-release deprecation process](https://github.com/microsoft/TypeScript/issues/51000) by initially suggesting migration via warnings and quick fixes - though we recognise that the deprecation process was originally intended only for flags.\r\n* **Auto-complete for static import/re-export declarations:** Auto-complete seems to be only working with dynamic `import()` right now. This could be expanded to also work for attributes in static declarations.\r\n\r\n## 📃 Motivating Example\r\n\r\nThis will be new ECMAScript syntax so motivation is to be compatible with the language. The champion group considers this to be stable, even though it just changed: this is what re-promoting to Stage 3 represents.\r\n\r\nIt sounds like this would also unblock https://github.com/microsoft/TypeScript/issues/49055#issuecomment-1485768138.\r\n\r\n## 💻 Use Cases\r\n\r\nhttps://github.com/tc39/proposal-import-attributes#motivation\r\n\r\nIn addition, we have an internal use case in Bloomberg to use Import Attributes as an annotation to achieve lazy-loading by deferring module evaluation.  This is an early implementation of [the TC39 proposal for Deferring Module Evaluation](https://github.com/tc39/proposal-defer-import-eval).\r\n\r\n---\r\n\r\nThis issue is raised only for awareness. At this point we are not planning to implement.\r\n","author":{"url":"https://github.com/mkubilayk","@type":"Person","name":"mkubilayk"},"datePublished":"2023-04-04T10:34:27Z","url":"https://github.com/microsoft/TypeScript/issues/53656"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0b1af26e-9b67-8f4c-1807-3bc6b6f23748
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id816C:1C6C3E:B222D9:EC6A12:6B00ED41
html-safe-noncefada74c9069ce761b32dce8d78207fdbf548d79001ccd5af0ad7e4956198324d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTZDOjFDNkMzRTpCMjIyRDk6RUM2QTEyOjZCMDBFRDQxIiwidmlzaXRvcl9pZCI6IjU2NzkzOTUzNDc5MDcwMTM5NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8318c124540ea0792c43de6289b621d8ee6090374355143eb1066fd197a43b0e
hovercard-subject-tagissue:1653621852
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/53656/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7322fae185613cc1b6fda044d5b718754b64b55a256fd1ece470bd5874f299fd/microsoft/TypeScript/issues/53656
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7322fae185613cc1b6fda044d5b718754b64b55a256fd1ece470bd5874f299fd/microsoft/TypeScript/issues/53656
og:image:altSuggestion 🔍 Search Terms import attributes, import assertions, esnext ✅ Viability Checklist My suggestion meets these guidelines: This wouldn't be a breaking change in existing TypeScript/JavaScri...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemkubilayk
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/53656#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F53656
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F53656
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/53656
Reloadhttps://github.com/microsoft/TypeScript/issues/53656
Reloadhttps://github.com/microsoft/TypeScript/issues/53656
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests308 (308)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/53656
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/53656
#54242https://github.com/microsoft/TypeScript/pull/54242
Import Attributes (Stage 3)https://github.com/microsoft/TypeScript/issues/53656#top
#54242https://github.com/microsoft/TypeScript/pull/54242
https://github.com/rbuckton
CommittedThe team has roadmapped this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Committed%22
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
TypeScript 5.3.0https://github.com/microsoft/TypeScript/milestone/189
https://github.com/mkubilayk
Kubilay Kahveci (mkubilayk)https://github.com/mkubilayk
on Apr 4, 2023https://github.com/microsoft/TypeScript/issues/53656#issue-1653621852
TypeScript's Design Goalshttps://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
https://github.com/tc39/proposal-import-attributeshttps://github.com/tc39/proposal-import-attributes
is deprecating the syntax with a plan to eventually remove it in Babel 8https://github.com/babel/babel/pull/15536
the 5-release deprecation processhttps://github.com/microsoft/TypeScript/issues/51000
#49055 (comment)https://github.com/microsoft/TypeScript/issues/49055#issuecomment-1485768138
https://github.com/tc39/proposal-import-attributes#motivationhttps://github.com/tc39/proposal-import-attributes#motivation
the TC39 proposal for Deferring Module Evaluationhttps://github.com/tc39/proposal-defer-import-eval
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
CommittedThe team has roadmapped this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Committed%22
on Apr 4, 2023https://github.com/microsoft/TypeScript/issues/53656#event-8926630034
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Ron Buckton (rbuckton)https://github.com/rbuckton
on Apr 4, 2023https://github.com/microsoft/TypeScript/issues/53656#event-8926630860
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Apr 4, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1496286155
https://github.com/nicolo-ribaudo
Nicolò Ribaudo (nicolo-ribaudo)https://github.com/nicolo-ribaudo
on Apr 5, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1497224982
1https://github.com/microsoft/TypeScript/issues/53656#user-content-fn-1-62935584785cef55c5acfb7cec000d72
tc39/proposal-import-attributes#133https://github.com/tc39/proposal-import-attributes/pull/133
https://github.com/tc39/proposal-import-attributes/issues/137https://github.com/tc39/proposal-import-attributes/issues/137
↩https://github.com/microsoft/TypeScript/issues/53656#user-content-fnref-1-62935584785cef55c5acfb7cec000d72
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Apr 5, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1498139518
https://github.com/nicolo-ribaudo
Nicolò Ribaudo (nicolo-ribaudo)https://github.com/nicolo-ribaudo
on Apr 6, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1498668025
paths optionhttps://www.typescriptlang.org/tsconfig#paths
https://github.com/arcanis
Maël Nison (arcanis)https://github.com/arcanis
on Apr 8, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1500910812
#38638https://github.com/microsoft/TypeScript/issues/38638
https://github.com/a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk)https://github.com/a-tarasyuk
on Apr 23, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1519150052
TypeScript/src/compiler/types.tshttps://github.com/microsoft/TypeScript/blob/ac55b297b755131af0388327e8115467c982c04b/src/compiler/types.ts#L3673
ac55b29https://github.com/microsoft/TypeScript/commit/ac55b297b755131af0388327e8115467c982c04b
TypeScript/src/compiler/types.tshttps://github.com/microsoft/TypeScript/blob/ac55b297b755131af0388327e8115467c982c04b/src/compiler/types.ts#L3709-L3714
ac55b29https://github.com/microsoft/TypeScript/commit/ac55b297b755131af0388327e8115467c982c04b
TypeScript/src/compiler/types.tshttps://github.com/microsoft/TypeScript/blob/ac55b297b755131af0388327e8115467c982c04b/src/compiler/types.ts#L2178
ac55b29https://github.com/microsoft/TypeScript/commit/ac55b297b755131af0388327e8115467c982c04b
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on May 2, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1530858415
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on May 2, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1530858932
Ron Buckton (@rbuckton)https://github.com/rbuckton
https://github.com/Jarred-Sumner
Jarred Sumner (Jarred-Sumner)https://github.com/Jarred-Sumner
on May 11, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1544689623
https://github.com/andrewbranch
Andrew Branch (andrewbranch)https://github.com/andrewbranch
on Jul 13, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1634322767
Nicolò Ribaudo (@nicolo-ribaudo)https://github.com/nicolo-ribaudo
tc39/proposal-import-attributes#137https://github.com/tc39/proposal-import-attributes/issues/137
tc39/ecma262#3057https://github.com/tc39/ecma262/pull/3057
https://github.com/nicolo-ribaudo
Nicolò Ribaudo (nicolo-ribaudo)https://github.com/nicolo-ribaudo
on Jul 14, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1635933314
https://github.com/andrewbranch
Andrew Branch (andrewbranch)https://github.com/andrewbranch
on Jul 14, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1635962218
https://github.com/nicolo-ribaudo
Nicolò Ribaudo (nicolo-ribaudo)https://github.com/nicolo-ribaudo
on Jul 14, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1636033637
https://github.com/rbuckton
Ron Buckton (rbuckton)https://github.com/rbuckton
on Jul 17, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1638965442
https://github.com/a-tarasyuk
Oleksandr Tarasiuk (a-tarasyuk)https://github.com/a-tarasyuk
on Jul 23, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1646954751
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
Ron Buckton (@rbuckton)https://github.com/rbuckton
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
TypeScript 5.3.0https://github.com/microsoft/TypeScript/milestone/189
on Aug 3, 2023https://github.com/microsoft/TypeScript/issues/53656#event-10001869681
https://github.com/rbuckton
Ron Buckton (rbuckton)https://github.com/rbuckton
on Aug 24, 2023https://github.com/microsoft/TypeScript/issues/53656#issuecomment-1691870496
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
on Aug 25, 2023https://github.com/microsoft/TypeScript/issues/53656#event-10197066628
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#54242https://github.com/microsoft/TypeScript/pull/54242
on Sep 26, 2023https://github.com/microsoft/TypeScript/issues/53656#event-10479720475
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/53656
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/53656
Ron Buckton (rbuckton)https://github.com/rbuckton
CommittedThe team has roadmapped this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Committed%22
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
TypeScript 5.3.0https://github.com/microsoft/TypeScript/milestone/189
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.