René's URL Explorer Experiment


Title: regression in 5.4: error TS2604: JSX element type 'Cmp' does not have any construct or call signatures. · Issue #57862 · microsoft/TypeScript · GitHub

Open Graph Title: regression in 5.4: error TS2604: JSX element type 'Cmp' does not have any construct or call signatures. · Issue #57862 · microsoft/TypeScript

X Title: regression in 5.4: error TS2604: JSX element type 'Cmp' does not have any construct or call signatures. · Issue #57862 · microsoft/TypeScript

Description: 🔎 Search Terms TS2604 🕗 Version & Regression Information This is a regression, it started happening with 5.4.0 Note that that comment lists 2 issues, now there's only the one TS2604 issue. The issue still exists in @next. ⏯ Playground Li...

Open Graph Description: 🔎 Search Terms TS2604 🕗 Version & Regression Information This is a regression, it started happening with 5.4.0 Note that that comment lists 2 issues, now there's only the one TS2604 issue. The issu...

X Description: 🔎 Search Terms TS2604 🕗 Version & Regression Information This is a regression, it started happening with 5.4.0 Note that that comment lists 2 issues, now there's only the one TS2604 issue. ...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"regression in 5.4: error TS2604: JSX element type 'Cmp' does not have any construct or call signatures.","articleBody":"### 🔎 Search Terms\n\nTS2604\n\n### 🕗 Version & Regression Information\n\nThis is a regression, it [started happening with 5.4.0](https://github.com/microsoft/TypeScript/issues/57058#issuecomment-1891054672)\r\n\r\nNote that that comment lists 2 issues, now there's only the one TS2604 issue.\r\n\r\nThe issue still exists in @next.\n\n### ⏯ Playground Link\n\nhttps://www.typescriptlang.org/play?#code/PTAEEsBcHIGdQIoHdwGtQCMCulQHtUBYAKHAFsAHPAJ1wCUBTAQwGNcAzavM0aa5ttBIkQoACoALcPGmh+ARyzh+AE1DsaoSBIYRYsLAwA0oFhKYA7AObhrEXJDxyGkLNQvjQZJqgYzcTKAq4OzsDPwWuOFc1CSQAJ4UugDyGABWDGwAClwUsAA8YgB8oAC8JKCVngwAHpAMFirwjCw0KvmW8SadRRVVAPzifZUAXKAWDABu4QDcwsQJSaAAYlgWbOB4FgDC3FQTkflZZaBrqBZ4SBYlpaAAFBS5sGNZAJRlJZ1zxCJgsJDUWxWAA+7A8sgUSlU6k02l00gMxlM5msQPsWicWwANvFkZl0BpqOoPN5fP5QIFgqFwg0otQYnFErocng8sl2PltskALJZG6gLm80C1eqNeC+eJ4digABSAGUABoAOgAkpFARZYOAWABRLEMMi02DDUCDeXKtUA2xa3X6w2RWAAbUFWQAuiaxi7hXUGk0VmsNltdpQtrT8rYwkTkoCrCy8r1iFVTaBUhlsk98tHwLGngmk2MJtNYj9iK1NbgsngcWUTZzvaK-f8NVZQMD-etIJsdntQ5ETk20W3Vh2u8H9rSincAN4mpNMZ4CygnaDBSbQCnwbZGWdVJV7x6s42JqoAXzGU43-U9oBPoAAZKA47B2fkB3YRb7N8mV+A16BPUU7ylCUM7HkmlSiJIsjBCoFjQHSMQQB4ACsSoAMzoZgODCvSNAyChSoACxKgADDulT8K47igJyS5TnuSoHnkJ5FFI+TANslBFN84FVKI4EAHr9CaJ7zEAA\n\n### 💻 Code\n\n```tsx\r\n// it's Qwik but ok\r\nimport React from 'react'\r\n\r\n// This is required for the issue, changing it to return T makes it a different error\r\ntype ObjectProps\u003cT> =\r\n    T extends Record\u003cany, any>\r\n    ? T\r\n    : never;\r\n\r\ntype FunctionComponent\u003cP = unknown> = (props: P) => any;\r\n\r\n// string|fn is required for the issue, changing it to only check for fn makes it a different error\r\ntype PropsOf\u003cCOMP> = COMP extends keyof JSX.IntrinsicElements\r\n    ? JSX.IntrinsicElements[COMP]\r\n    : COMP extends FunctionComponent\u003cinfer OrigProps>\r\n    ? ObjectProps\u003cOrigProps>\r\n    : never\r\n\r\nconst Poly =\r\n    \u003cC extends string | FunctionComponent = string | FunctionComponent>({\r\n        as: Cmp = 'div' as C,\r\n        ...props\r\n    }: { as?: C } & PropsOf\u003cstring extends C ? 'div' : C>) => {\r\n        // This didn't error in 5.3.3 but errors in 5.4.0\r\n        return \u003cCmp {...props}>hi\u003c/Cmp>;\r\n        //      ^?\r\n    }\r\n```\r\n\r\nIn 5.3.3, the type of Cmp is roughly `String|FunctionComponent`, and in 5.4.2 it's `C|(C&string)`\n\n### 🙁 Actual behavior\n\nIt can't determine that Cmp is a function\n\n### 🙂 Expected behavior\n\nIt should determine that Cmp is a valid JSX tag\n\n### Additional information about the issue\n\n_No response_","author":{"url":"https://github.com/wmertens","@type":"Person","name":"wmertens"},"datePublished":"2024-03-20T10:20:13Z","url":"https://github.com/microsoft/TypeScript/issues/57862"}

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:353e2d70-5813-4774-7320-94f2a6013d6f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC73C:1760D:E798AE:12ECA07:6B04E875
html-safe-nonce9b3d8d97c850d389027e7df217f671646c74b896662c987ade748f1220c087f2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzNDOjE3NjBEOkU3OThBRToxMkVDQTA3OjZCMDRFODc1IiwidmlzaXRvcl9pZCI6Ijc2NzAxMzIzNzM0MzgzOTI0MzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac466d414673c4c76ab9ba3d325137a0907e629820c440af2fb3a8381b9fa03215
hovercard-subject-tagissue:2197167785
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/57862/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5513c7e9d67e56d80e1c25fa6d44ecfe081276908cd75ef8151706411f5295dd/microsoft/TypeScript/issues/57862
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5513c7e9d67e56d80e1c25fa6d44ecfe081276908cd75ef8151706411f5295dd/microsoft/TypeScript/issues/57862
og:image:alt🔎 Search Terms TS2604 🕗 Version & Regression Information This is a regression, it started happening with 5.4.0 Note that that comment lists 2 issues, now there's only the one TS2604 issue. The issu...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamewmertens
hostnamegithub.com
expected-hostnamegithub.com
Nonef3851aad500d8e8dce736722ddc6fa9596e17d9fce3c53581eba968664c0bc32
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
releasee29c922455fd8137f27e1cfcdf6a1e8b920b1926
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/57862#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F57862
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%2F57862
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/57862
Reloadhttps://github.com/microsoft/TypeScript/issues/57862
Reloadhttps://github.com/microsoft/TypeScript/issues/57862
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/57862
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/57862
regression in 5.4: error TS2604: JSX element type 'Cmp' does not have any construct or call signatures.https://github.com/microsoft/TypeScript/issues/57862#top
https://github.com/wmertens
Wout Mertens (wmertens)https://github.com/wmertens
on Mar 20, 2024https://github.com/microsoft/TypeScript/issues/57862#issue-2197167785
started happening with 5.4.0https://github.com/microsoft/TypeScript/issues/57058#issuecomment-1891054672
https://www.typescriptlang.org/play?#code/PTAEEsBcHIGdQIoHdwGtQCMCulQHtUBYAKHAFsAHPAJ1wCUBTAQwGNcAzavM0aa5ttBIkQoACoALcPGmh+ARyzh+AE1DsaoSBIYRYsLAwA0oFhKYA7AObhrEXJDxyGkLNQvjQZJqgYzcTKAq4OzsDPwWuOFc1CSQAJ4UugDyGABWDGwAClwUsAA8YgB8oAC8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DUCDeXKtUA2xa3X6w2RWAAbUFWQAuiaxi7hXUGk0VmsNltdpQtrT8rYwkTkoCrCy8r1iFVTaBUhlsk98tHwLGngmk2MJtNYj9iK1NbgsngcWUTZzvaK-f8NVZQMD-etIJsdntQ5ETk20W3Vh2u8H9rSincAN4mpNMZ4CygnaDBSbQCnwbZGWdVJV7x6s42JqoAXzGU43-U9oBPoAAZKA47B2fkB3YRb7N8mV+A16BPUU7ylCUM7HkmlSiJIsjBCoFjQHSMQQB4ACsSoAMzoZgODCvSNAyChSoACxKgADDulT8K47igJyS5TnuSoHnkJ5FFI+TANslBFN84FVKI4EAHr9CaJ7zEAA
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Working as Intendedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%22
Working as Intendedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%22
on Mar 20, 2024https://github.com/microsoft/TypeScript/issues/57862#event-12190557654
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Mar 20, 2024https://github.com/microsoft/TypeScript/issues/57862#issuecomment-2010558312
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Mar 20, 2024https://github.com/microsoft/TypeScript/issues/57862#issuecomment-2010682144
#57117 (comment)https://github.com/microsoft/TypeScript/issues/57117#issuecomment-1910301159
https://github.com/wmertens
Wout Mertens (wmertens)https://github.com/wmertens
on Mar 20, 2024https://github.com/microsoft/TypeScript/issues/57862#issuecomment-2010688774
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Mar 20, 2024https://github.com/microsoft/TypeScript/issues/57862#issuecomment-2010812978
#56004https://github.com/microsoft/TypeScript/pull/56004
https://github.com/wmertens
Wout Mertens (wmertens)https://github.com/wmertens
on Mar 21, 2024https://github.com/microsoft/TypeScript/issues/57862#issuecomment-2011324612
https://github.com/wmertens
Wout Mertens (wmertens)https://github.com/wmertens
on Mar 21, 2024https://github.com/microsoft/TypeScript/issues/57862#issuecomment-2011327403
https://github.com/wmertens
Wout Mertens (wmertens)https://github.com/wmertens
on Mar 27, 2024https://github.com/microsoft/TypeScript/issues/57862#issuecomment-2022211991
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
https://github.com/wmertens
Wout Mertens (wmertens)https://github.com/wmertens
on Mar 27, 2024https://github.com/microsoft/TypeScript/issues/57862#issuecomment-2023082059
Wout Mertens (wmertens)https://github.com/wmertens
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Mar 27, 2024https://github.com/microsoft/TypeScript/issues/57862#event-12267791571
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Mar 27, 2024https://github.com/microsoft/TypeScript/issues/57862#issuecomment-2023084597
microsofthttps://github.com/microsoft
on Oct 22, 2025https://github.com/microsoft/TypeScript/issues/57862#event-20419648309
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/57862
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/57862
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.