René's URL Explorer Experiment


Title: [5.4 regression] Conditional type changes behavior with 5.4-beta · Issue #57221 · microsoft/TypeScript · GitHub

Open Graph Title: [5.4 regression] Conditional type changes behavior with 5.4-beta · Issue #57221 · microsoft/TypeScript

X Title: [5.4 regression] Conditional type changes behavior with 5.4-beta · Issue #57221 · microsoft/TypeScript

Description: 🔎 Search Terms 5.4 regression 🕗 Version & Regression Information This changed between versions 5.3.3 and 5.4-beta ⏯ Playground Link https://www.typescriptlang.org/play?ts=5.4.0-dev.20240129#code/KYDwDg9gTgLgBDAnmYcCiIZQIYGMYBKEArjMAArY4C...

Open Graph Description: 🔎 Search Terms 5.4 regression 🕗 Version & Regression Information This changed between versions 5.3.3 and 5.4-beta ⏯ Playground Link https://www.typescriptlang.org/play?ts=5.4.0-dev.20240129#code/KY...

X Description: 🔎 Search Terms 5.4 regression 🕗 Version & Regression Information This changed between versions 5.3.3 and 5.4-beta ⏯ Playground Link https://www.typescriptlang.org/play?ts=5.4.0-dev.20240129#cod...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[5.4 regression] Conditional type changes behavior with 5.4-beta","articleBody":"### 🔎 Search Terms\n\n5.4 regression\n\n### 🕗 Version & Regression Information\n\n- This changed between versions 5.3.3 and 5.4-beta\r\n\n\n### ⏯ Playground Link\n\nhttps://www.typescriptlang.org/play?ts=5.4.0-dev.20240129#code/KYDwDg9gTgLgBDAnmYcCiIZQIYGMYBKEArjMAArY4C2AzgDwAqcoZAdgCa1y1YCWbAOYA+OAF4e-IS0zBO3RgFgAUHDgB+OAWC5oHerygDBAGklGhwlWoBccZqzlc4AAwAkAbwEAzYFDgA+gDKMFQwAL42nj5+cJQ04QD00Wy+-tq84S7WGnAecADaANZwAnFU2NRwAD5wRcCIEN7omDj4RKQUFXT0GTDCALp2hsZw4Tl2DrLyrilpgSFhkXOx8ZVZOZr5xaVs5TRD5qPjqnB2HuEA3CoqHDoANlSo3sRs+HwQe-cCRUwy7M4RpYABQ5KiCWjnHJqMDYGAAC0m11O4TgADI4MCLv8nNwMFg8IQSGQ1j1GKItnBYTRaOpzqjUecqd1IS0Ce1iV0aUxROEAJQmFR8uwANwgfA4yJUiUSLCgUGguwQ3AArAA6ADMmrg2E4cHVABY1QAGAC0ACNgKEVN82EUscyEXYAOSJGzeCAQN3mqjOszUyqs7H85EyuUK-xlGCqzWasxsCDhxVRmNGs2W0JquBBeEke4cOCWnV7PwRtU2n4O2FOuCu92e71URJ+5k0pkeiAujvOsZjPnIoA\n\n### 💻 Code\n\n```ts\r\nexport type ExtractRouteParams\u003cT extends string> = string extends T\r\n  ? Record\u003cstring, string>\r\n  : T extends `${infer _Start}:${infer Param}/${infer Rest}`\r\n  ? { [k in Param | keyof ExtractRouteParams\u003cRest>]: string }\r\n  : T extends `${infer _Start}:${infer Param}`\r\n  ? { [k in Param]: string }\r\n  : {};\r\n\r\ndeclare function link\u003cT extends string>(\r\n  args: {\r\n    path: T;\r\n  } & ({} extends ExtractRouteParams\u003cT> ? { params?: {} } : { params: ExtractRouteParams\u003cT> }),\r\n): void;\r\n\r\n// error in ts 5.3.3 and 5.4.0-beta\r\nlink({ path: '/:foo/:bar', params: {} });\r\n// error in ts 5.3.3, no error in ts 5.4.0-beta\r\nlink({ path: '/:foo/:bar/', params: { foo: 'foo' } });\r\n```\r\n\n\n### 🙁 Actual behavior\n\nThe last line is only an error in TS 5.3.3, not TS 5.4-beta.\n\n### 🙂 Expected behavior\n\nI'd expect it to be an error in both (`foo` isn't specified).\n\n### Additional information about the issue\n\nPutting `NoInfer` in the conditional type makes the expected error reappear:\r\n\r\n```\r\n- } & ({} extends ExtractRouteParams\u003cT> ? { params?: {} } : { params: ExtractRouteParams\u003cT> }),\r\n+ } & ({} extends ExtractRouteParams\u003cNoInfer\u003cT>> ? { params?: {} } : { params: ExtractRouteParams\u003cNoInfer\u003cT>> }),\r\n```\r\n\r\nSo perhaps this is WAI? Just wanted to flag it as a change I noticed from 5.3.3 to 5.4-beta.","author":{"url":"https://github.com/danvk","@type":"Person","name":"danvk"},"datePublished":"2024-01-29T22:22:24Z","url":"https://github.com/microsoft/TypeScript/issues/57221"}

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:d71301b4-a920-4b49-63c9-f87d39d3a48f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB1AC:1A6005:4432E9:5B9096:6B04F3D5
html-safe-nonce9799e4c6c38a240621b3de5e01bda28b57b0c29576742903154b974e44322ba0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUFDOjFBNjAwNTo0NDMyRTk6NUI5MDk2OjZCMDRGM0Q1IiwidmlzaXRvcl9pZCI6IjUwMjA5MzU4ODY0MjE5ODQ4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac44ab9fa6f76ab54f9ce0262b11ef0bcc0869de1f5bf03105a65d298b433ffd68
hovercard-subject-tagissue:2106542707
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/57221/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3a36958ead641f389500ef7aa75fef516d681ff4232e83a0ca2d89dcd1014a77/microsoft/TypeScript/issues/57221
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3a36958ead641f389500ef7aa75fef516d681ff4232e83a0ca2d89dcd1014a77/microsoft/TypeScript/issues/57221
og:image:alt🔎 Search Terms 5.4 regression 🕗 Version & Regression Information This changed between versions 5.3.3 and 5.4-beta ⏯ Playground Link https://www.typescriptlang.org/play?ts=5.4.0-dev.20240129#code/KY...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedanvk
hostnamegithub.com
expected-hostnamegithub.com
Nonec0ff704de2671f716381d0ef36115cddb81606dd5397a5b003230bb8c02d623b
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
releasecbe60d43d23e17438879ed212ad20068394651c4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/57221#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F57221
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%2F57221
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/57221
Reloadhttps://github.com/microsoft/TypeScript/issues/57221
Reloadhttps://github.com/microsoft/TypeScript/issues/57221
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests319 (319)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/57221
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/57221
[5.4 regression] Conditional type changes behavior with 5.4-betahttps://github.com/microsoft/TypeScript/issues/57221#top
Not a Defecthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Not%20a%20Defect%22
https://github.com/danvk
Dan Vanderkam (danvk)https://github.com/danvk
on Jan 29, 2024https://github.com/microsoft/TypeScript/issues/57221#issue-2106542707
https://www.typescriptlang.org/play?ts=5.4.0-dev.20240129#code/KYDwDg9gTgLgBDAnmYcCiIZQIYGMYBKEArjMAArY4C2AzgDwAqcoZAdgCa1y1YCWbAOYA+OAF4e-IS0zBO3RgFgAUHDgB+OAWC5oHerygDBAGklGhwlWoBccZqzlc4AAwAkAbwEAzYFDgA+gDKMFQwAL42nj5+cJQ04QD00Wy+-tq84S7WGnAecADaANZwAnFU2NRwAD5wRcCIEN7omDj4RKQUFXT0GTDCALp2hsZw4Tl2DrLyrilpgSFhkXOx8ZVZOZr5xaVs5TRD5qPjqnB2HuEA3CoqHDoANlSo3sRs+HwQe-cCRUwy7M4RpYABQ5KiCWjnHJqMDYGAAC0m11O4TgADI4MCLv8nNwMFg8IQSGQ1j1GKItnBYTRaOpzqjUecqd1IS0Ce1iV0aUxROEAJQmFR8uwANwgfA4yJUiUSLCgUGguwQ3AArAA6ADMmrg2E4cHVABY1QAGAC0ACNgKEVN82EUscyEXYAOSJGzeCAQN3mqjOszUyqs7H85EyuUK-xlGCqzWasxsCDhxVRmNGs2W0JquBBeEke4cOCWnV7PwRtU2n4O2FOuCu92e71URJ+5k0pkeiAujvOsZjPnIoAhttps://www.typescriptlang.org/play?ts=5.4.0-dev.20240129#code/KYDwDg9gTgLgBDAnmYcCiIZQIYGMYBKEArjMAArY4C2AzgDwAqcoZAdgCa1y1YCWbAOYA+OAF4e-IS0zBO3RgFgAUHDgB+OAWC5oHerygDBAGklGhwlWoBccZqzlc4AAwAkAbwEAzYFDgA+gDKMFQwAL42nj5+cJQ04QD00Wy+-tq84S7WGnAecADaANZwAnFU2NRwAD5wRcCIEN7omDj4RKQUFXT0GTDCALp2hsZw4Tl2DrLyrilpgSFhkXOx8ZVZOZr5xaVs5TRD5qPjqnB2HuEA3CoqHDoANlSo3sRs+HwQe-cCRUwy7M4RpYABQ5KiCWjnHJqMDYGAAC0m11O4TgADI4MCLv8nNwMFg8IQSGQ1j1GKItnBYTRaOpzqjUecqd1IS0Ce1iV0aUxROEAJQmFR8uwANwgfA4yJUiUSLCgUGguwQ3AArAA6ADMmrg2E4cHVABY1QAGAC0ACNgKEVN82EUscyEXYAOSJGzeCAQN3mqjOszUyqs7H85EyuUK-xlGCqzWasxsCDhxVRmNGs2W0JquBBeEke4cOCWnV7PwRtU2n4O2FOuCu92e71URJ+5k0pkeiAujvOsZjPnIoA
https://github.com/Andarist
Mateusz Burzyński (Andarist)https://github.com/Andarist
on Jan 29, 2024https://github.com/microsoft/TypeScript/issues/57221#issuecomment-1915712553
#56515https://github.com/microsoft/TypeScript/pull/56515
https://github.com/Andarist
Mateusz Burzyński (Andarist)https://github.com/Andarist
on Jan 29, 2024https://github.com/microsoft/TypeScript/issues/57221#issuecomment-1915757014
#56515https://github.com/microsoft/TypeScript/pull/56515
#56515https://github.com/microsoft/TypeScript/pull/56515
https://github.com/B4nan
Martin Adámek (B4nan)https://github.com/B4nan
on Jan 31, 2024https://github.com/microsoft/TypeScript/issues/57221#issuecomment-1918648435
mikro-orm/mikro-orm#5197https://github.com/mikro-orm/mikro-orm/pull/5197
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Feb 1, 2024https://github.com/microsoft/TypeScript/issues/57221#issuecomment-1921940404
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Not a Defecthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Not%20a%20Defect%22
on Feb 1, 2024https://github.com/microsoft/TypeScript/issues/57221#event-11674640515
https://github.com/typescript-bot
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
on Feb 4, 2024https://github.com/microsoft/TypeScript/issues/57221#issuecomment-1925516128
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
not plannedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Feb 4, 2024https://github.com/microsoft/TypeScript/issues/57221#event-11693907432
microsofthttps://github.com/microsoft
on Oct 22, 2025https://github.com/microsoft/TypeScript/issues/57221#event-20419635591
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/57221
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/57221
Not a Defecthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Not%20a%20Defect%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.