René's URL Explorer Experiment


Title: Generic type constraint ignored when applied to interface expecting a different signature. · Issue #15458 · microsoft/TypeScript · GitHub

Open Graph Title: Generic type constraint ignored when applied to interface expecting a different signature. · Issue #15458 · microsoft/TypeScript

X Title: Generic type constraint ignored when applied to interface expecting a different signature. · Issue #15458 · microsoft/TypeScript

Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Generic type constraint ignored when applied to interface expecting a different signature. · Issue #15458 · microsoft/TypeScript

Open Graph Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Generic type constraint ignored when applied to interface expecting a different signature. · Issue #15458 · micros...

X Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Generic type constraint ignored when applied to interface expecting a different signature. · Issue #15458 · micros...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Generic type constraint ignored when applied to interface expecting a different signature.","articleBody":"Not sure if I found a bug or not, so just checking first.  The code below should not work, but it compiles fine:\r\n\r\n```\r\ninterface IType\u003cTInstance> {\r\n    new (value: boolean, ...args: any[]): TInstance;\r\n}\r\n\r\nclass Test\u003cT extends string> {\r\n    constructor(value: T) { }\r\n}\r\n\r\nfunction doSomething(_type: IType\u003cany>) { }\r\n\r\ndoSomething(Test);\r\n\r\n```\r\n([here](https://www.typescriptlang.org/play/index.html#src=interface%20IType%3CTInstance%3E%20%7B%0D%0A%20%20%20%20new%20(value%3A%20boolean%2C%20...args%3A%20any%5B%5D)%3A%20TInstance%3B%0D%0A%7D%0D%0A%0D%0Aclass%20Test%3CT%20extends%20string%3E%20%7B%0D%0A%20%20%20%20constructor(value%3A%20T)%20%7B%20%7D%0D%0A%7D%0D%0A%0D%0Afunction%20doSomething(_type%3A%20IType%3Cany%3E)%20%7B%20%7D%0D%0A%0D%0AdoSomething(Test)%3B%0D%0A))\r\n\r\nIf I change ` constructor(value: T) { }` to ` constructor(value: string) { }` it fails.  It should fail anyhow, since T could NEVER be of the expected type. :/\r\n\r\nThis also just seems wrong: \r\n\r\n```\r\ninterface IType\u003cTInstance> {\r\n    new (value: boolean, ...args: any[]): TInstance;\r\n}\r\n\r\nclass Test\u003cT extends Object> {\r\n    constructor(value: T) { }\r\n}\r\n\r\nfunction doSomething(_type: IType\u003cany>) { }\r\n\r\ndoSomething(Test);\r\n\r\nclass O extends Object { }\r\n\r\nclass TO extends Test\u003cO> { }\r\n\r\ndoSomething(TO);\r\n```\r\nCompiles just fine. :/","author":{"url":"https://github.com/rjamesnw","@type":"Person","name":"rjamesnw"},"datePublished":"2017-04-29T01:55:23Z","url":"https://github.com/microsoft/TypeScript/issues/15458"}

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/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:e6e5336a-4989-33dc-892a-8b806b1b615b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9EFA:DA744:B20123:F0135F:6B00F750
html-safe-nonce0f0170cc24b5d8a19dcf4e683c6eece4f1377b559587bcf47f61d2697d029952
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUZBOkRBNzQ0OkIyMDEyMzpGMDEzNUY6NkIwMEY3NTAiLCJ2aXNpdG9yX2lkIjoiMjAwMzEwMjI4NDM5MzMyNjg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac405b69588786c2f0a397c55ce2d3f481fd3e119e6d8aea17472133fe70d45884
hovercard-subject-tagrepository:20929025
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/microsoft/TypeScript/issues/15458
twitter:imagehttps://opengraph.githubassets.com/7f74c95cbe889dbb3d9b1bf9b33e028a73710cb2fdd6519734f41a069c8c2bfa/microsoft/TypeScript
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7f74c95cbe889dbb3d9b1bf9b33e028a73710cb2fdd6519734f41a069c8c2bfa/microsoft/TypeScript
og:image:altTypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Generic type constraint ignored when applied to interface expecting a different signature. · Issue #15458 · micros...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
turbo-cache-controlno-cache
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
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/15458#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F15458
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%2F15458
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/15458
Reloadhttps://github.com/microsoft/TypeScript/issues/15458
Reloadhttps://github.com/microsoft/TypeScript/issues/15458
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/15458
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/15458
Generic type constraint ignored when applied to interface expecting a different signature.https://github.com/microsoft/TypeScript/issues/15458#top
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%22
https://github.com/rjamesnw
James (rjamesnw)https://github.com/rjamesnw
on Apr 29, 2017https://github.com/microsoft/TypeScript/issues/15458#issue-225226174
herehttps://www.typescriptlang.org/play/index.html#src=interface%20IType%3CTInstance%3E%20%7B%0D%0A%20%20%20%20new%20(value%3A%20boolean%2C%20...args%3A%20any%5B%5D)%3A%20TInstance%3B%0D%0A%7D%0D%0A%0D%0Aclass%20Test%3CT%20extends%20string%3E%20%7B%0D%0A%20%20%20%20constructor(value%3A%20T)%20%7B%20%7D%0D%0A%7D%0D%0A%0D%0Afunction%20doSomething(_type%3A%20IType%3Cany%3E)%20%7B%20%7D%0D%0A%0D%0AdoSomething(Test)%3B%0D%0A
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on May 17, 2017https://github.com/microsoft/TypeScript/issues/15458#issuecomment-302251313
#8397https://github.com/microsoft/TypeScript/issues/8397
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%22
on May 17, 2017https://github.com/microsoft/TypeScript/issues/15458#event-1086874813
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 17, 2017https://github.com/microsoft/TypeScript/issues/15458#event-1086874981
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on May 18, 2017https://github.com/microsoft/TypeScript/issues/15458#issuecomment-302483242
#5616https://github.com/microsoft/TypeScript/issues/5616
microsofthttps://github.com/microsoft
on Jun 14, 2018https://github.com/microsoft/TypeScript/issues/15458#event-1682158049
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/15458
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/15458
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%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

Viewport: width=device-width


URLs of crawlers that visited me.