René's URL Explorer Experiment


Title: It is possible to violate generic constraints when distributing union types · Issue #63708 · microsoft/TypeScript · GitHub

Open Graph Title: It is possible to violate generic constraints when distributing union types · Issue #63708 · microsoft/TypeScript

X Title: It is possible to violate generic constraints when distributing union types · Issue #63708 · microsoft/TypeScript

Description: 🔎 Search Terms constraint, conditional, distributive, distributed, distribution 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed the FAQ for entries about "constraint" ⏯ Playground Link htt...

Open Graph Description: 🔎 Search Terms constraint, conditional, distributive, distributed, distribution 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed the FAQ for entries ...

X Description: 🔎 Search Terms constraint, conditional, distributive, distributed, distribution 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed the FAQ for entr...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"It is possible to violate generic constraints when distributing union types","articleBody":"### 🔎 Search Terms\n\nconstraint, conditional, distributive, distributed, distribution\n\n### 🕗 Version & Regression Information\n\n- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _\"constraint\"_\n\n### ⏯ Playground Link\n\nhttps://www.typescriptlang.org/play/?#code/C4TwDgpgBAkgznArhAPAQQDRQEJQgD2AgDsATOKNAPigF5K9CTypFiBrYgewHdiAoKFAD8ORkTIU2nXgKFDRAZQAWvdFmxVB8gFxRiEAG4QATtr0HjJgNz9+oSFBVrMYghJbU6UANqvsALpQAGRQAN4Avrb24NAAGt7wSKgADFAAPlAAjFhpmVlUtkA\n\n### 💻 Code\n\n```ts\ntype Issue\u003cA, B extends A> = A extends unknown\n  ? B extends unknown\n    ? Show\u003cA, B>\n    : never\n  : never;\n\ntype Show\u003cA, B extends A> = [A, B] & {};\n\ntype X = Issue\u003c0 | 1, 0 | 1>;\n```\n\n\n### 🙁 Actual behavior\n\n`X` is evaluated to `[0, 0] | [0, 1] | [1, 0] | [1, 1]`.\n\nNo errors are reported despite the `[0, 1] | [1, 0]` part resulting from the evaluation of `Show\u003c0, 1>` and `Show\u003c1, 0>` which should not be allowed because of the `B extends A` constraint.\n\n### 🙂 Expected behavior\n\nAn error is reported on line 3, saying the constraint might be violated.\n\n### Additional information about the issue\n\nThis is how the type should actually be implemented:\n\n```ts\ntype Issue\u003cA, B extends A> = A extends unknown\n  ? B extends A\n    ? Show\u003cA, B> // only B members that extend the current A member reach this line\n    : never\n  : never;\n```","author":{"url":"https://github.com/aweebit","@type":"Person","name":"aweebit"},"datePublished":"2026-08-02T01:44:47Z","url":"https://github.com/microsoft/TypeScript/issues/63708"}

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:a9db7b59-4319-7101-1111-fc797f442e52
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB5CE:269AD9:FFED8A:1568ECF:6B01123B
html-safe-noncec2e2b115ac7567addb1110ab0c8368b2339346c6a89639089c8ab11ec11b85b6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUNFOjI2OUFEOTpGRkVEOEE6MTU2OEVDRjo2QjAxMTIzQiIsInZpc2l0b3JfaWQiOiIyMjk3NTE5NDkwNTc3NjY5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac977fdac458a205a66db7ce9f32d9173f17df0e405dd7099eb5e9d0d6dec68bd5
hovercard-subject-tagissue:5040035255
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/63708/issue_layout
twitter:imagehttps://opengraph.githubassets.com/31da8f447b2a939c7c6a639dba38ec30f01b33e5fdab4fed7c3dd3eb7cf8d18f/microsoft/TypeScript/issues/63708
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/31da8f447b2a939c7c6a639dba38ec30f01b33e5fdab4fed7c3dd3eb7cf8d18f/microsoft/TypeScript/issues/63708
og:image:alt🔎 Search Terms constraint, conditional, distributive, distributed, distribution 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed the FAQ for entries ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameaweebit
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
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
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/63708#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F63708
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%2F63708
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/63708
Reloadhttps://github.com/microsoft/TypeScript/issues/63708
Reloadhttps://github.com/microsoft/TypeScript/issues/63708
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests310 (310)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/63708
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/63708
#64237https://github.com/microsoft/TypeScript/pull/64237
It is possible to violate generic constraints when distributing union typeshttps://github.com/microsoft/TypeScript/issues/63708#top
#64237https://github.com/microsoft/TypeScript/pull/64237
https://github.com/ahejlsberg
Possible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some caseshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Possible%20Improvement%22
TypeScript 7.1.0 Betahttps://github.com/microsoft/TypeScript/milestone/224
https://github.com/aweebit
aweebithttps://github.com/aweebit
on Aug 2, 2026https://github.com/microsoft/TypeScript/issues/63708#issue-5040035255
https://www.typescriptlang.org/play/?#code/C4TwDgpgBAkgznArhAPAQQDRQEJQgD2AgDsATOKNAPigF5K9CTypFiBrYgewHdiAoKFAD8ORkTIU2nXgKFDRAZQAWvdFmxVB8gFxRiEAG4QATtr0HjJgNz9+oSFBVrMYghJbU6UANqvsALpQAGRQAN4Avrb24NAAGt7wSKgADFAAPlAAjFhpmVlUtkAhttps://www.typescriptlang.org/play/#code/C4TwDgpgBAkgznArhAPAQQDRQEJQgD2AgDsATOKNAPigF5K9CTypFiBrYgewHdiAoKFAD8ORkTIU2nXgKFDRAZQAWvdFmxVB8gFxRiEAG4QATtr0HjJgNz9+oSFBVrMYghJbU6UANqvsALpQAGRQAN4Avrb24NAAGt7wSKgADFAAPlAAjFhpmVlUtkA
aweebithttps://github.com/aweebit
on Aug 2, 2026https://github.com/microsoft/TypeScript/issues/63708#event-28832281252
https://github.com/snarbles2
snarbles2https://github.com/snarbles2
on Aug 3, 2026https://github.com/microsoft/TypeScript/issues/63708#issuecomment-5166145811
https://github.com/jcalz
Joe Calzaretta (jcalz)https://github.com/jcalz
on Aug 3, 2026https://github.com/microsoft/TypeScript/issues/63708#issuecomment-5166761425
Playground linkhttps://www.typescriptlang.org/play/#code/C4TwDgpgBAkgznArhAPAQShAHsCA7AEzij0QFsAjCAJwBooAhTHfIqNAPigF53ndCxJgH4SEAG40oALigBlABYB7AO7p6DDgChQkecrUZsAtqUo0N-VsU48oAAwAkAbwYBfK4Kgu0b+1p1waAAJMjI7eCRUAAYoAB8oAEZ6aO0AejSoLIA9YS0gA
https://github.com/snarbles2
snarbles2https://github.com/snarbles2
on Aug 3, 2026https://github.com/microsoft/TypeScript/issues/63708#issuecomment-5166870235
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on Aug 3, 2026https://github.com/microsoft/TypeScript/issues/63708#event-28898084195
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Aug 3, 2026https://github.com/microsoft/TypeScript/issues/63708#event-28898087425
https://github.com/ahejlsberg
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Aug 27, 2026https://github.com/microsoft/TypeScript/issues/63708#issuecomment-5440619666
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Design LimitationConstraints of the existing architecture prevent this from being fixedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Limitation%22
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on Aug 27, 2026https://github.com/microsoft/TypeScript/issues/63708#event-30110267991
https://github.com/aweebit
aweebithttps://github.com/aweebit
on Aug 28, 2026https://github.com/microsoft/TypeScript/issues/63708#issuecomment-5447287228
Anders Hejlsberg (@ahejlsberg)https://github.com/ahejlsberg
Joe Calzaretta (@jcalz)https://github.com/jcalz
https://github.com/aweebit
aweebithttps://github.com/aweebit
on Aug 28, 2026https://github.com/microsoft/TypeScript/issues/63708#issuecomment-5447448451
Joe Calzaretta (@jcalz)https://github.com/jcalz
https://github.com/ahejlsberg
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Aug 28, 2026https://github.com/microsoft/TypeScript/issues/63708#issuecomment-5453841089
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Possible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some caseshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Possible%20Improvement%22
Design LimitationConstraints of the existing architecture prevent this from being fixedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Limitation%22
on Aug 28, 2026https://github.com/microsoft/TypeScript/issues/63708#event-30170676301
https://github.com/ahejlsberg
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Sep 10, 2026https://github.com/microsoft/TypeScript/issues/63708#issuecomment-5624424809
#64237https://github.com/microsoft/TypeScript/pull/64237
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
TypeScript 7.1.0 Betahttps://github.com/microsoft/TypeScript/milestone/224
on Sep 10, 2026https://github.com/microsoft/TypeScript/issues/63708#event-30927244449
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#64237https://github.com/microsoft/TypeScript/pull/64237
on Sep 16, 2026https://github.com/microsoft/TypeScript/issues/63708#event-31266494114
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/63708
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/63708
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Possible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some caseshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Possible%20Improvement%22
TypeScript 7.1.0 BetaNo due datehttps://github.com/microsoft/TypeScript/milestone/224
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.