René's URL Explorer Experiment


Title: ESM-only packages come with synthesized default in `moduleResolution: bundler` · Issue #54752 · microsoft/TypeScript · GitHub

Open Graph Title: ESM-only packages come with synthesized default in `moduleResolution: bundler` · Issue #54752 · microsoft/TypeScript

X Title: ESM-only packages come with synthesized default in `moduleResolution: bundler` · Issue #54752 · microsoft/TypeScript

Description: Bug Report 🔎 Search Terms module resolution bundler synthesized default 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link Playground link with relevant code 💻 Code // @moduleResolution: bu...

Open Graph Description: Bug Report 🔎 Search Terms module resolution bundler synthesized default 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link Playground link with relev...

X Description: Bug Report 🔎 Search Terms module resolution bundler synthesized default 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link Playground link with r...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ESM-only packages come with synthesized default in `moduleResolution: bundler`","articleBody":"# Bug Report\r\n\r\n### 🔎 Search Terms\r\n\r\nmodule resolution bundler synthesized default\r\n\r\n### 🕗 Version \u0026 Regression Information\r\n\r\n- This is the behavior in every version I tried\r\n\r\n### ⏯ Playground Link\r\n\r\n[Playground link with relevant code](https://www.typescriptlang.org/play?target=99\u0026moduleResolution=100#code/PTAEAEFsHsBMFcA2BTASsgztR8AuBLaAOwC5QAjeI2FAJwCgQIYEUzMjkAPXRscXAENaAc2S52GTj3r18kAA7RauUJFiCMuADSgA3qFzQAyrlr4iI0AF9QAM1rRIoAETrNuALR58iT0c8tc0sXAG5QJlwATwVMMgBmADoAJkSABll3LUSjU2CRelyzCwL6AGNiLTUNLWTQAF5QQQB3QXxVeSUVAAo3Gq8fPwCgkpcASnDImLjQJNSM+izcVNhkO0EkXiWVtY3EXByTYstF-tSi-NluLtU9ayA)\r\n\r\n### 💻 Code\r\n\r\n```ts\r\n// @moduleResolution: bundler\r\n// @module: esnext\r\n// @target: esnext\r\n\r\nimport mdast, { toString } from \"mdast-util-to-string\"; // types: 3.2.0\r\n\r\nmdast.toString\r\ntoString\r\n\r\nconst mdast2 = await import(\"mdast-util-to-string\"); // types: 3.2.0\r\n\r\nmdast2.default\r\nmdast2.default.toString\r\nmdast2.toString\r\n\r\nexport {}\r\n```\r\n\r\n### 🙁 Actual behavior\r\n\r\n`default` export is available here and points to the whole module. I don't think this is right, even with `moduleResolution: bundler` but I can be wrong about this since it's really hard to know what kind of assumptions and goals this mode has when it comes to subtle details\r\n\r\n### 🙂 Expected behavior\r\n\r\nI don't expect `default` to be available here since this ESM-only package **doesn't** have a default export. \r\n\r\nNote that even if this isn't a bug, `.default` available on that dynamically imported binding should behave in the same way in the IDE as the specifier coming from the import statement. Right now the hover info isn't available on it and go to (type?) definition doesn't work on it with cmd+click.\r\n\r\ncc @andrewbranch \r\n","author":{"url":"https://github.com/Andarist","@type":"Person","name":"Andarist"},"datePublished":"2023-06-23T11:40:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/54752/TypeScript/issues/54752"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c1c8cea1-c9a9-87a1-5bb4-688bbd3a674e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAA90:1712DC:523A1F3:6B05D03:6A5D75E0
html-safe-nonce21c8a29d9be2f6e69fdeea05f0d67aa8250eb819e380ca0299dd7f651e795650
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTkwOjE3MTJEQzo1MjNBMUYzOjZCMDVEMDM6NkE1RDc1RTAiLCJ2aXNpdG9yX2lkIjoiNDkyMDUyMTI2MTQ0ODAwMDk5MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6cbe96f51ee8387dec8f6897a41cfb6a7d48160f8ab5a62841b4dfbbc3b5b90d
hovercard-subject-tagissue:1771314217
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/54752/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7fed29c43520d3e12e4c475075852763e052b5dc58da3ca4e7d32f4384eb39f4/microsoft/TypeScript/issues/54752
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7fed29c43520d3e12e4c475075852763e052b5dc58da3ca4e7d32f4384eb39f4/microsoft/TypeScript/issues/54752
og:image:altBug Report 🔎 Search Terms module resolution bundler synthesized default 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link Playground link with relev...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAndarist
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
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
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/54752#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F54752
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F54752
Sign up https://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/54752
Reloadhttps://github.com/microsoft/TypeScript/issues/54752
Reloadhttps://github.com/microsoft/TypeScript/issues/54752
Please reload this pagehttps://github.com/microsoft/TypeScript/issues/54752
microsoft https://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Notifications https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Fork 13.6k https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Star 110k https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Code https://github.com/microsoft/TypeScript
Issues 5k+ https://github.com/microsoft/TypeScript/issues
Pull requests 31 https://github.com/microsoft/TypeScript/pulls
Actions https://github.com/microsoft/TypeScript/actions
Projects https://github.com/microsoft/TypeScript/projects
Models https://github.com/microsoft/TypeScript/models
Wiki https://github.com/microsoft/TypeScript/wiki
Security and quality 0 https://github.com/microsoft/TypeScript/security
Insights https://github.com/microsoft/TypeScript/pulse
Code https://github.com/microsoft/TypeScript
Issues https://github.com/microsoft/TypeScript/issues
Pull requests https://github.com/microsoft/TypeScript/pulls
Actions https://github.com/microsoft/TypeScript/actions
Projects https://github.com/microsoft/TypeScript/projects
Models https://github.com/microsoft/TypeScript/models
Wiki https://github.com/microsoft/TypeScript/wiki
Security and quality https://github.com/microsoft/TypeScript/security
Insights https://github.com/microsoft/TypeScript/pulse
#58825https://github.com/microsoft/TypeScript/pull/58825
#57896https://github.com/microsoft/TypeScript/pull/57896
ESM-only packages come with synthesized default in moduleResolution: bundlerhttps://github.com/microsoft/TypeScript/issues/54752#top
#58825https://github.com/microsoft/TypeScript/pull/58825
#57896https://github.com/microsoft/TypeScript/pull/57896
https://github.com/andrewbranch
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
TypeScript 5.6.0https://github.com/microsoft/TypeScript/milestone/199
https://github.com/Andarist
Andaristhttps://github.com/Andarist
on Jun 23, 2023https://github.com/microsoft/TypeScript/issues/54752#issue-1771314217
Playground link with relevant codehttps://www.typescriptlang.org/play?target=99&moduleResolution=100#code/PTAEAEFsHsBMFcA2BTASsgztR8AuBLaAOwC5QAjeI2FAJwCgQIYEUzMjkAPXRscXAENaAc2S52GTj3r18kAA7RauUJFiCMuADSgA3qFzQAyrlr4iI0AF9QAM1rRIoAETrNuALR58iT0c8tc0sXAG5QJlwATwVMMgBmADoAJkSABll3LUSjU2CRelyzCwL6AGNiLTUNLWTQAF5QQQB3QXxVeSUVAAo3Gq8fPwCgkpcASnDImLjQJNSM+izcVNhkO0EkXiWVtY3EXByTYstF-tSi-NluLtU9ayA
@andrewbranchhttps://github.com/andrewbranch
andrewbranchhttps://github.com/andrewbranch
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
TypeScript 5.6.0No due datehttps://github.com/microsoft/TypeScript/milestone/199
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.