René's URL Explorer Experiment


Title: Constraints should be inference sites for other type parameters · Issue #7234 · microsoft/TypeScript · GitHub

Open Graph Title: Constraints should be inference sites for other type parameters · Issue #7234 · microsoft/TypeScript

X Title: Constraints should be inference sites for other type parameters · Issue #7234 · microsoft/TypeScript

Description: TypeScript Version: 1.8.0 Code interface Class { new(): T; } declare function create1(ctor: Class): T; declare function create2>(ctor: C): T; class A {} let a1 = create1(A); // a: A --> OK let a2 = create2(...

Open Graph Description: TypeScript Version: 1.8.0 Code interface Class { new(): T; } declare function create1(ctor: Class): T; declare function create2>(ctor: C): T; class A {} let a1 = crea...

X Description: TypeScript Version: 1.8.0 Code interface Class<T> { new(): T; } declare function create1<T>(ctor: Class<T>): T; declare function create2<T, C extends Class<T>>(ctor: C...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Constraints should be inference sites for other type parameters","articleBody":"\u003c!--\nThank you for contributing to TypeScript! Please review this checklist\n       before submitting your issue.\n[ ] Many common issues and suggestions are addressed in the FAQ\n     https://github.com/Microsoft/TypeScript/wiki/FAQ\n[ ] Search for duplicates before logging new issues\n    https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue\n[ ] Questions are best asked and answered at Stack Overflow\n    http://stackoverflow.com/questions/tagged/typescript\n\nFor bug reports, please include the information below.\n__________________________________________________________ -->\n\n**TypeScript Version:** \n\n1.8.0\n\n**Code**\n\n``` ts\ninterface Class\u003cT> {\n    new(): T;\n}\ndeclare function create1\u003cT>(ctor: Class\u003cT>): T;\ndeclare function create2\u003cT, C extends Class\u003cT>>(ctor: C): T;\n\nclass A {}\nlet a1 = create1(A); // a: A --> OK\nlet a2 = create2(A); // a: {} --> Should be A\n```\n\n**Context**\n\nThe example above is simplified to illustrate the difference between `create1` and `create2`. I need both type parameters for the use case I have in mind (React) because it returns a type which is parameterized by both `T` and `C`:\n\n``` ts\ndeclare function createElement\u003cT, C extends Class\u003cT>>(type: C): Element\u003cT, C>;\nvar e = createElement(A); // e: Element\u003c{}, typeof A> --> Should be Element\u003cA, typeof A>\n\ndeclare function render\u003cT>(e: Element\u003cT, any>): T;\nvar a = render(e); // a: {} --> Should be A\n```\n\nAgain, this is simplified, but the motivation is to improve the return type inference of `ReactDOM.render`.\n","author":{"url":"https://github.com/vsiao","@type":"Person","name":"vsiao"},"datePublished":"2016-02-25T05:57:09Z","url":"https://github.com/microsoft/TypeScript/issues/7234"}

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:124c60d5-b21a-350f-565d-260f2a880d44
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD4D8:172B92:4F0616:6BD4D2:6B00CEED
html-safe-noncea62a309776640dcb7d49da1ab906f34a167a8ff1a831d5a96bf05d431b3a2e81
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEQ4OjE3MkI5Mjo0RjA2MTY6NkJENEQyOjZCMDBDRUVEIiwidmlzaXRvcl9pZCI6IjgxNDIwNDUxMDkxMzE3MjY1NzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc16cb5d993f0349b91c5e20469ad083d5f23e1068d188f9ade2317b0ecc8ea3e
hovercard-subject-tagissue:136289924
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/7234/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d862a1ff9b8ec22ca87aff3a4489f701258886ff95e48227417b94c39d189805/microsoft/TypeScript/issues/7234
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d862a1ff9b8ec22ca87aff3a4489f701258886ff95e48227417b94c39d189805/microsoft/TypeScript/issues/7234
og:image:altTypeScript Version: 1.8.0 Code interface Class { new(): T; } declare function create1(ctor: Class): T; declare function create2>(ctor: C): T; class A {} let a1 = crea...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevsiao
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/7234#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F7234
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%2F7234
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/7234
Reloadhttps://github.com/microsoft/TypeScript/issues/7234
Reloadhttps://github.com/microsoft/TypeScript/issues/7234
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/7234
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/7234
Constraints should be inference sites for other type parametershttps://github.com/microsoft/TypeScript/issues/7234#top
https://github.com/sandersn
Effort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Effort%3A%20Moderate%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
TypeScript 2.0https://github.com/microsoft/TypeScript/milestone/1
https://github.com/vsiao
Vincent Siao (vsiao)https://github.com/vsiao
on Feb 25, 2016https://github.com/microsoft/TypeScript/issues/7234#issue-136289924
Nexthttps://github.com/microsoft/TypeScript/issues/7234?timeline_page=1
https://github.com/vsiao
Vincent Siao (vsiao)https://github.com/vsiao
on Feb 25, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-188630511
#6783https://github.com/microsoft/TypeScript/issues/6783
https://github.com/vsiao
Vincent Siao (vsiao)https://github.com/vsiao
on Feb 26, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-189425408
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
https://github.com/vsiao
Vincent Siao (vsiao)https://github.com/vsiao
on Feb 26, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-189471356
James Brantly (@jbrantly)https://github.com/jbrantly
https://github.com/jbrantly
James Brantly (jbrantly)https://github.com/jbrantly
on Feb 26, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-189487033
thishttps://github.com/Microsoft/TypeScript/issues/2304#issuecomment-149201348
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Feb 26, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-189493044
Vincent Siao (vsiao)https://github.com/vsiao
on Mar 1, 2016https://github.com/microsoft/TypeScript/issues/7234#event-572913253
Vincent Siao (vsiao)https://github.com/vsiao
on Mar 1, 2016https://github.com/microsoft/TypeScript/issues/7234#event-572913858
https://github.com/vsiao
Vincent Siao (vsiao)https://github.com/vsiao
on Mar 1, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-190688118
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on Mar 3, 2016https://github.com/microsoft/TypeScript/issues/7234#event-576692106
https://github.com/JHawkley
JHawkleyhttps://github.com/JHawkley
on Mar 13, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-195926364
Vincent Siao (@vsiao)https://github.com/vsiao
https://github.com/vsiao
Vincent Siao (vsiao)https://github.com/vsiao
on Mar 13, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-195947012
JHawkleyhttps://github.com/JHawkley
https://github.com/vsiao
Vincent Siao (vsiao)https://github.com/vsiao
on Mar 13, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-196038673
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Accepting PRshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Accepting%20PRs%22
In DiscussionNot yet reached consensushttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22In%20Discussion%22
on Mar 15, 2016https://github.com/microsoft/TypeScript/issues/7234#event-589676118
https://github.com/myitcv
Paul Jolly (myitcv)https://github.com/myitcv
on Apr 9, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-207867683
Jason Freeman (@JsonFreeman)https://github.com/JsonFreeman
Paul Jolly (@myitcv)https://github.com/myitcv
#138https://github.com/microsoft/TypeScript/issues/138
this examplehttps://github.com/Microsoft/TypeScript/issues/7234#issuecomment-205756975
#138https://github.com/microsoft/TypeScript/issues/138
https://github.com/JsonFreeman
Jason Freeman (JsonFreeman)https://github.com/JsonFreeman
on Apr 10, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-207904535
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
https://github.com/myitcv
Paul Jolly (myitcv)https://github.com/myitcv
on Apr 10, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-208034833
Daniel Rosenwasser (@DanielRosenwasser)https://github.com/DanielRosenwasser
Constraints should be inference sites for other type parameters #7234https://github.com/microsoft/TypeScript/issues/7234
Use contextual signature instantiation to compare signatures #138https://github.com/microsoft/TypeScript/issues/138
Use contextual signature instantiation to compare signatures #138https://github.com/microsoft/TypeScript/issues/138
Constraints should be inference sites for other type parameters #7234https://github.com/microsoft/TypeScript/issues/7234
Use contextual signature instantiation to compare signatures #138https://github.com/microsoft/TypeScript/issues/138
https://github.com/shlomiassaf
Shlomi Assaf (shlomiassaf)https://github.com/shlomiassaf
on Apr 10, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-208040968
Paul Jolly (@myitcv)https://github.com/myitcv
https://github.com/JsonFreeman
Jason Freeman (JsonFreeman)https://github.com/JsonFreeman
on Apr 10, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-208051565
Shlomi Assaf (@shlomiassaf)https://github.com/shlomiassaf
#220https://github.com/microsoft/TypeScript/pull/220
https://github.com/JsonFreeman
Jason Freeman (JsonFreeman)https://github.com/JsonFreeman
on Apr 10, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-208056757
Paul Jolly (@myitcv)https://github.com/myitcv
https://github.com/myitcv
Paul Jolly (myitcv)https://github.com/myitcv
on Apr 10, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-208057967
Jason Freeman (@JsonFreeman)https://github.com/JsonFreeman
https://github.com/JsonFreeman
Jason Freeman (JsonFreeman)https://github.com/JsonFreeman
on Apr 10, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-208062123
https://github.com/JsonFreeman
Jason Freeman (JsonFreeman)https://github.com/JsonFreeman
on Apr 10, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-208073694
https://github.com/myitcv
Paul Jolly (myitcv)https://github.com/myitcv
on Apr 10, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-208081641
Jason Freeman (@JsonFreeman)https://github.com/JsonFreeman
https://github.com/JsonFreeman
Jason Freeman (JsonFreeman)https://github.com/JsonFreeman
on Apr 11, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-208102191
https://github.com/ahejlsberg
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Jun 3, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-223627422
#8821https://github.com/microsoft/TypeScript/pull/8821
https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Jun 17, 2016https://github.com/microsoft/TypeScript/issues/7234#issuecomment-226833927
Advanced Types in the handbookhttps://www.typescriptlang.org/docs/handbook/advanced-types.html
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 17, 2016https://github.com/microsoft/TypeScript/issues/7234#event-696247397
microsofthttps://github.com/microsoft
on Jun 19, 2018https://github.com/microsoft/TypeScript/issues/7234#event-1689640501
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/7234
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/7234
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
Effort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Effort%3A%20Moderate%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
TypeScript 2.0https://github.com/microsoft/TypeScript/milestone/1
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.