René's URL Explorer Experiment


Title: Declaration emit can't utilize exports map information and ends up reporting "this is likely not portable" · Issue #56107 · microsoft/TypeScript · GitHub

Open Graph Title: Declaration emit can't utilize exports map information and ends up reporting "this is likely not portable" · Issue #56107 · microsoft/TypeScript

X Title: Declaration emit can't utilize exports map information and ends up reporting "this is likely not portable" · Issue #56107 · microsoft/TypeScript

Description: 🔎 Search Terms declaration emit nodenext exports map package.json inferred type annotation necessary 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link No response 💻 Code // @strict: true /...

Open Graph Description: 🔎 Search Terms declaration emit nodenext exports map package.json inferred type annotation necessary 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Li...

X Description: 🔎 Search Terms declaration emit nodenext exports map package.json inferred type annotation necessary 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playgroun...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Declaration emit can't utilize exports map information and ends up reporting \"this is likely not portable\"","articleBody":"### 🔎 Search Terms\n\ndeclaration emit nodenext exports map package.json inferred type annotation necessary\n\n### 🕗 Version & Regression Information\n\n- This is the behavior in every version I tried\n\n### ⏯ Playground Link\n\n_No response_\n\n### 💻 Code\n\n```ts\r\n// @strict: true\r\n// @declaration: true\r\n// @module: nodenext\r\n// @noImplicitReferences: true\r\n\r\n// @filename: node_modules/effect/dist/declarations/src/Data.d.ts\r\nimport type * as Types from \"./Types.js\";\r\nimport type * as Equal from \"./Equal.js\";\r\n\r\nexport type Data\u003cA extends Readonly\u003cRecord\u003cstring, any>> | ReadonlyArray\u003cany>> =\r\n  Readonly\u003cA> & Equal.Equal;\r\n\r\nexport declare const TaggedClass: \u003cKey extends string>(\r\n  tag: Key,\r\n) => new \u003cA extends Record\u003cstring, any>>(\r\n  args: Types.Equals\u003cOmit\u003cA, keyof Equal.Equal>, {}> extends true\r\n    ? void\r\n    : Omit\u003cA, keyof Equal.Equal>,\r\n) => Data\u003c\r\n  A & {\r\n    _tag: Key;\r\n  }\r\n>;\r\n\r\n// @filename: node_modules/effect/dist/declarations/src/Equal.d.ts\r\nimport * as Hash from \"./Hash.js\";\r\n\r\nexport declare const symbol: unique symbol;\r\n\r\nexport interface Equal extends Hash.Hash {\r\n  [symbol](that: Equal): boolean;\r\n}\r\n\r\n// @filename: node_modules/effect/dist/declarations/src/Hash.d.ts\r\nexport declare const symbol: unique symbol;\r\n\r\nexport interface Hash {\r\n  [symbol](): number;\r\n}\r\n\r\n// @filename: node_modules/effect/dist/declarations/src/Types.d.ts\r\nexport type Equals\u003cX, Y> = (\u003cT>() => T extends X ? 1 : 2) extends \u003c\r\n  T,\r\n>() => T extends Y ? 1 : 2\r\n  ? true\r\n  : false;\r\n\r\n// @filename: node_modules/effect/dist/declarations/src/index.d.ts\r\nexport * as Data from \"./Data.js\";\r\n\r\n// @filename: node_modules/effect/dist/effect.cjs.d.ts\r\nexport * from \"./declarations/src/index\";\r\n\r\n// @filename: node_modules/effect/Equal/dist/effect-Equal.cjs.d.ts\r\nexport * from \"../../dist/declarations/src/Equal\";\r\n\r\n// @filename: node_modules/effect/Types/dist/effect-Types.cjs.d.ts\r\nexport * from \"../../dist/declarations/src/Types\";\r\n\r\n// @filename: node_modules/effect/package.json\r\n{\r\n  \"name\": \"effect\",\r\n  \"exports\": {\r\n    \".\": \"./dist/effect.cjs.js\",\r\n    \"./Equal\": \"./Equal/dist/effect-Equal.cjs.js\",\r\n    \"./Types\": \"./Types/dist/effect-Types.cjs.js\"\r\n  }\r\n}\r\n\r\n// @filename: src/index.ts\r\nimport { Data } from \"effect\";\r\nexport class Foo extends Data.TaggedClass(\"Foo\")\u003c{}> {}\r\n```\r\n\n\n### 🙁 Actual behavior\n\n```\r\n==== src/index.ts (2 errors) ====\r\n    import { Data } from \"effect\";\r\n    export class Foo extends Data.TaggedClass(\"Foo\")\u003c{}> {}\r\n                 ~~~\r\n!!! error TS2742: The inferred type of 'Foo' cannot be named without a reference to '../node_modules/effect/dist/declarations/src/Equal'. This is likely not portable. A type annotation is necessary.\r\n                 ~~~\r\n!!! error TS2742: The inferred type of 'Foo' cannot be named without a reference to '../node_modules/effect/dist/declarations/src/Types'. This is likely not portable. A type annotation is necessary.\r\n```\n\n### 🙂 Expected behavior\n\n```ts\r\n//// [index.d.ts]\r\nimport { Data } from \"effect\";\r\ndeclare const Foo_base: new \u003cA extends Record\u003cstring, any>>(args: import(\"effect/Types\").Equals\u003cOmit\u003cA, keyof import(\"effect/Equal\").Equal>, {}> extends true ? void : Omit\u003cA, keyof import(\"effect/Equal\").Equal>) => Data.Data\u003cA & {\r\n    _tag: \"Foo\";\r\n}>;\r\nexport declare class Foo extends Foo_base\u003c{}> {\r\n}\r\nexport {};\r\n```\n\n### Additional information about the issue\n\nI think that it would be best if the listed `exports` entries (especially the ones not relying on wildcards but the wildcard support would also be nice) could be automatically loaded by the compiler at some stage of the declaration emit.\r\n\r\nIn this case, this would allow the compiler to discover `effect/Types` and `effect/Equal` and `getAlternativeContainingModules` could return them. \r\n\r\ncc @andrewbranch as `package.json#exports` is your turf 😉 ","author":{"url":"https://github.com/Andarist","@type":"Person","name":"Andarist"},"datePublished":"2023-10-14T22:29:29Z","url":"https://github.com/microsoft/TypeScript/issues/56107"}

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:d1ab3e20-bd22-4e56-d4f1-1d0fb97cfcd8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB5C0:C9BDE:FDC0BB:150494D:6B05120B
html-safe-nonceacce5e13423b3bc689a77ab78a3960e561357ed2efc91f063a016553a5c5a686
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUMwOkM5QkRFOkZEQzBCQjoxNTA0OTREOjZCMDUxMjBCIiwidmlzaXRvcl9pZCI6IjQwMzEyMDY4NjY0NTI1NTAxNTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2300af5d1e74e8c2186fe172870fcd8b17152c9c0a6c836881e07416fa01748d
hovercard-subject-tagissue:1943585589
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/56107/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2a433021486b0cc95b60f21c45ab0d4ac8b96589f13fd496ebcea701f8f41f2f/microsoft/TypeScript/issues/56107
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2a433021486b0cc95b60f21c45ab0d4ac8b96589f13fd496ebcea701f8f41f2f/microsoft/TypeScript/issues/56107
og:image:alt🔎 Search Terms declaration emit nodenext exports map package.json inferred type annotation necessary 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Li...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAndarist
hostnamegithub.com
expected-hostnamegithub.com
None854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b
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
release220e980097d94ce616d5d11fbd5316d208e3fc93
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/56107#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F56107
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%2F56107
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/56107
Reloadhttps://github.com/microsoft/TypeScript/issues/56107
Reloadhttps://github.com/microsoft/TypeScript/issues/56107
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests321 (321)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/56107
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/56107
Declaration emit can't utilize exports map information and ends up reporting "this is likely not portable"https://github.com/microsoft/TypeScript/issues/56107#top
Design Limitationhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Limitation%22
https://github.com/Andarist
Mateusz Burzyński (Andarist)https://github.com/Andarist
on Oct 14, 2023https://github.com/microsoft/TypeScript/issues/56107#issue-1943585589
Andrew Branch (@andrewbranch)https://github.com/andrewbranch
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Needs Investigationhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on Oct 16, 2023https://github.com/microsoft/TypeScript/issues/56107#event-10669761299
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Andrew Branch (andrewbranch)https://github.com/andrewbranch
on Oct 16, 2023https://github.com/microsoft/TypeScript/issues/56107#event-10669761853
Andrew Branch (andrewbranch)https://github.com/andrewbranch
TypeScript 5.3.1https://github.com/microsoft/TypeScript/milestone/194
on Oct 30, 2023https://github.com/microsoft/TypeScript/issues/56107#event-10811659606
https://github.com/andrewbranch
Andrew Branch (andrewbranch)https://github.com/andrewbranch
on Oct 30, 2023https://github.com/microsoft/TypeScript/issues/56107#issuecomment-1785888438
Andrew Branch (andrewbranch)https://github.com/andrewbranch
Design Limitationhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Limitation%22
Needs Investigationhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on Oct 30, 2023https://github.com/microsoft/TypeScript/issues/56107#event-10812108438
Andrew Branch (andrewbranch)https://github.com/andrewbranch
on Oct 30, 2023https://github.com/microsoft/TypeScript/issues/56107#event-10812108947
https://github.com/andrewbranch
Andrew Branch (andrewbranch)https://github.com/andrewbranch
on Oct 30, 2023https://github.com/microsoft/TypeScript/issues/56107#issuecomment-1785889261
#56174https://github.com/microsoft/TypeScript/issues/56174
https://github.com/Andarist
Mateusz Burzyński (Andarist)https://github.com/Andarist
on Oct 30, 2023https://github.com/microsoft/TypeScript/issues/56107#issuecomment-1786019232
https://github.com/andrewbranch
Andrew Branch (andrewbranch)https://github.com/andrewbranch
on Oct 30, 2023https://github.com/microsoft/TypeScript/issues/56107#issuecomment-1786066499
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Feb 24, 2024https://github.com/microsoft/TypeScript/issues/56107#event-11909294747
Jimmy Song (jimmy-phantom)https://github.com/jimmy-phantom
on Apr 6, 2026https://github.com/microsoft/TypeScript/issues/56107#event-24239480330
fix(fetchium): Fix declaration emit for downstream consumershttps://github.com/jimmy-phantom/fetchium/commit/8dca304297fbb2373b13ac02eb2650d16117765c
8dca304https://github.com/jimmy-phantom/fetchium/commit/8dca304297fbb2373b13ac02eb2650d16117765c
fix(fetchium): Fix declaration emit and rest subpath for downstream c…https://github.com/Signalium/fetchium/commit/610f77f2e250bceb0cf02fd5af9d465dfc6df79b
610f77fhttps://github.com/Signalium/fetchium/commit/610f77f2e250bceb0cf02fd5af9d465dfc6df79b
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/56107
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/56107
Design Limitationhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Limitation%22
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.