René's URL Explorer Experiment


Title: TS is overly picky when declaring a class constructor type · Issue #29707 · microsoft/TypeScript · GitHub

Open Graph Title: TS is overly picky when declaring a class constructor type · Issue #29707 · microsoft/TypeScript

X Title: TS is overly picky when declaring a class constructor type · Issue #29707 · microsoft/TypeScript

Description: TypeScript Version: 3.4.0-dev.20190202 Search Terms: class, extend, constructor, any[] Code type ClassConstructor = new(...args: any[]) => {} function mixin(Class: C) { return class extends Class {} } Expected...

Open Graph Description: TypeScript Version: 3.4.0-dev.20190202 Search Terms: class, extend, constructor, any[] Code type ClassConstructor = new(...args: any[]) => {} function mixin(Class: C) { ...

X Description: TypeScript Version: 3.4.0-dev.20190202 Search Terms: class, extend, constructor, any[] Code type ClassConstructor = new(...args: any[]) => {} function mixin<C extends ClassConstructor>(Cla...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TS is overly picky when declaring a class constructor type","articleBody":"**TypeScript Version:**  3.4.0-dev.20190202\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** class, extend, constructor, any[]\r\n\r\n**Code**\r\n\r\n```ts\r\ntype ClassConstructor = new(...args: any[]) => {}\r\n\r\nfunction mixin\u003cC extends ClassConstructor>(Class: C) {\r\n  return class extends Class {}\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nI should be able to replace `...args: any[]` with `...args: unknown[]`, or any other signature.\r\n\r\n**Actual behavior:**\r\n\r\n```\r\nError: Type 'C' is not a constructor function type. [2507]\r\n```\r\n\r\n**Playground Link:** https://www.typescriptlang.org/play/index.html#src=type%20ClassConstructor%20%3D%20new(...args%3A%20unknown%5B%5D)%20%3D%3E%20%7B%7D%0D%0A%0D%0Afunction%20mixin%3CC%20extends%20ClassConstructor%3E(Class%3A%20C)%20%7B%0D%0A%20%20return%20class%20extends%20Class%20%7B%7D%0D%0A%7D\r\n","author":{"url":"https://github.com/bcherny","@type":"Person","name":"bcherny"},"datePublished":"2019-02-03T04:58:29Z","url":"https://github.com/microsoft/TypeScript/issues/29707"}

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:768d95fc-3165-7c26-e68a-7cd2a11987f7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC9F8:311EEE:63763D:866724:6B00D46F
html-safe-nonced8fffa0d215e6ca4bca17bb062e32f0d731104014f7bfc276f2a2e99d541c536
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUY4OjMxMUVFRTo2Mzc2M0Q6ODY2NzI0OjZCMDBENDZGIiwidmlzaXRvcl9pZCI6IjcyMTU5MDk3MDYwOTM2MTQxOTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac5e0158ad44c03b641fa74e4aa5a929c91493438c78f4a382e0c47be201e5ac63
hovercard-subject-tagissue:406053293
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/29707/issue_layout
twitter:imagehttps://opengraph.githubassets.com/83b9ce974460ec7c45566b9c334fd746f8824beadff93af7de2fe4e2a54390ca/microsoft/TypeScript/issues/29707
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/83b9ce974460ec7c45566b9c334fd746f8824beadff93af7de2fe4e2a54390ca/microsoft/TypeScript/issues/29707
og:image:altTypeScript Version: 3.4.0-dev.20190202 Search Terms: class, extend, constructor, any[] Code type ClassConstructor = new(...args: any[]) => {} function mixin(Class: C) { ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebcherny
hostnamegithub.com
expected-hostnamegithub.com
None85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5
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
release4943239a6d2c591325dad6e5c313e1cafda877f6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/29707#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F29707
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%2F29707
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/29707
Reloadhttps://github.com/microsoft/TypeScript/issues/29707
Reloadhttps://github.com/microsoft/TypeScript/issues/29707
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests307 (307)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/29707
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/29707
TS is overly picky when declaring a class constructor typehttps://github.com/microsoft/TypeScript/issues/29707#top
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: classesBehavior of various `class` constructs, e.g. mixins or base classeshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20classes%22
Backloghttps://github.com/microsoft/TypeScript/milestone/29
https://github.com/bcherny
Boris Cherny (bcherny)https://github.com/bcherny
on Feb 3, 2019https://github.com/microsoft/TypeScript/issues/29707#issue-406053293
https://www.typescriptlang.org/play/index.html#src=type%20ClassConstructor%20%3D%20new(...args%3A%20unknown%5B%5D)%20%3D%3E%20%7B%7D%0D%0A%0D%0Afunction%20mixin%3CC%20extends%20ClassConstructor%3E(Class%3A%20C)%20%7B%0D%0A%20%20return%20class%20extends%20Class%20%7B%7D%0D%0A%7Dhttps://www.typescriptlang.org/play/index.html#src=type%20ClassConstructor%20%3D%20new(...args%3A%20unknown%5B%5D)%20%3D%3E%20%7B%7D%0D%0A%0D%0Afunction%20mixin%3CC%20extends%20ClassConstructor%3E(Class%3A%20C)%20%7B%0D%0A%20%20return%20class%20extends%20Class%20%7B%7D%0D%0A%7D
https://github.com/dragomirtitian
Titian Cernicova-Dragomir (dragomirtitian)https://github.com/dragomirtitian
on Feb 3, 2019https://github.com/microsoft/TypeScript/issues/29707#issuecomment-460037789
requesthttps://github.com/Microsoft/TypeScript/pull/13743
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
on Feb 4, 2019https://github.com/microsoft/TypeScript/issues/29707#event-2116337897
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Feb 4, 2019https://github.com/microsoft/TypeScript/issues/29707#issuecomment-460336479
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
help wantedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
good first issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
on Feb 4, 2019https://github.com/microsoft/TypeScript/issues/29707#event-2116339252
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Communityhttps://github.com/microsoft/TypeScript/milestone/2
on Feb 4, 2019https://github.com/microsoft/TypeScript/issues/29707#event-2116339354
https://github.com/dragomirtitian
Titian Cernicova-Dragomir (dragomirtitian)https://github.com/dragomirtitian
on Feb 4, 2019https://github.com/microsoft/TypeScript/issues/29707#issuecomment-460416230
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Feb 4, 2019https://github.com/microsoft/TypeScript/issues/29707#issuecomment-460417996
Titian Cernicova-Dragomir (@dragomirtitian)https://github.com/dragomirtitian
https://github.com/dragomirtitian
Titian Cernicova-Dragomir (dragomirtitian)https://github.com/dragomirtitian
on Feb 4, 2019https://github.com/microsoft/TypeScript/issues/29707#issuecomment-460452563
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Feb 4, 2019https://github.com/microsoft/TypeScript/issues/29707#issuecomment-460459503
https://github.com/dragomirtitian
Titian Cernicova-Dragomir (dragomirtitian)https://github.com/dragomirtitian
on Feb 5, 2019https://github.com/microsoft/TypeScript/issues/29707#issuecomment-460467694
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Communityhttps://github.com/microsoft/TypeScript/milestone/2
Backloghttps://github.com/microsoft/TypeScript/milestone/29
on Mar 7, 2019https://github.com/microsoft/TypeScript/issues/29707#event-2188538033
https://github.com/jszopi
Jan Szopinski (jszopi)https://github.com/jszopi
on Jul 23, 2022https://github.com/microsoft/TypeScript/issues/29707#issuecomment-1193043857
Aman Pratap Singh (aman1-2)https://github.com/aman1-2
on Feb 5, 2025https://github.com/microsoft/TypeScript/issues/29707#event-16188727494
Fix: Correct constructor type inference in checker.ts (microsoft#29707).https://github.com/aman1-2/TypeScript/commit/07774924b943e28a245a704c38a68689d67a929d
microsoft#29707https://github.com/microsoft/TypeScript/issues/29707
0777492https://github.com/aman1-2/TypeScript/commit/07774924b943e28a245a704c38a68689d67a929d
https://github.com/tysoncung
Tyson Cung (tysoncung)https://github.com/tysoncung
on Oct 7, 2025https://github.com/microsoft/TypeScript/issues/29707#issuecomment-3375208966
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Domain: classesBehavior of various `class` constructs, e.g. mixins or base classeshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20classes%22
on Oct 16, 2025https://github.com/microsoft/TypeScript/issues/29707#event-20330936921
https://github.com/alisa-xh
alisa-xhhttps://github.com/alisa-xh
on Apr 14, 2026https://github.com/microsoft/TypeScript/issues/29707#issuecomment-4248128808
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Apr 15, 2026https://github.com/microsoft/TypeScript/issues/29707#issuecomment-4253541609
snarbles2https://github.com/snarbles2
https://github.com/LeonxLJX
Stella (LeonxLJX)https://github.com/LeonxLJX
on Sep 1, 2026https://github.com/microsoft/TypeScript/issues/29707#issuecomment-5490014523
Stella (@LeonxLJX)https://github.com/LeonxLJX
https://github.com/LeonxLJX
Stella (LeonxLJX)https://github.com/LeonxLJX
on Sep 1, 2026https://github.com/microsoft/TypeScript/issues/29707#issuecomment-5492443090
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Help Wantedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Help%20Wanted%22
Good First Issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Good%20First%20Issue%22
on Nov 10, 2026https://github.com/microsoft/TypeScript/issues/29707#event-35721621469
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/29707
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/29707
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: classesBehavior of various `class` constructs, e.g. mixins or base classeshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20classes%22
BacklogNo due datehttps://github.com/microsoft/TypeScript/milestone/29
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.