René's URL Explorer Experiment


Title: Regression for omitted lambda parameter with tuple args · Issue #30301 · microsoft/TypeScript · GitHub

Open Graph Title: Regression for omitted lambda parameter with tuple args · Issue #30301 · microsoft/TypeScript

X Title: Regression for omitted lambda parameter with tuple args · Issue #30301 · microsoft/TypeScript

Description: TypeScript Version: 3.4.0-dev.20190309 Search Terms: 3.4 tuple lambda Code The following snippet compiles fine in TS 3.3 whereas it emits an error in TS 3.4. type MyTupleItem = {}; type MyTuple = [MyTupleItem, ...MyTupleItem[]]; type Gen...

Open Graph Description: TypeScript Version: 3.4.0-dev.20190309 Search Terms: 3.4 tuple lambda Code The following snippet compiles fine in TS 3.3 whereas it emits an error in TS 3.4. type MyTupleItem = {}; type MyTuple = [...

X Description: TypeScript Version: 3.4.0-dev.20190309 Search Terms: 3.4 tuple lambda Code The following snippet compiles fine in TS 3.3 whereas it emits an error in TS 3.4. type MyTupleItem = {}; type MyTuple = [...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Regression for omitted lambda parameter with tuple args","articleBody":"\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:**  3.4.0-dev.20190309\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** 3.4 tuple lambda\r\n\r\n**Code**\r\n\r\nThe following snippet compiles fine in TS 3.3 whereas it emits an error in TS 3.4.\r\n\r\n```ts\r\ntype MyTupleItem = {};\r\ntype MyTuple = [MyTupleItem, ...MyTupleItem[]];\r\n\r\ntype GenericFunction\u003cT extends MyTuple> = (...fromArgs: T) => void;\r\n\r\nclass GenericClass\u003cT extends MyTuple> {\r\n    from: T | undefined;\r\n}\r\n\r\nfunction createClass\u003cT extends MyTuple>(f: GenericFunction\u003cT>): GenericClass\u003cT> {\r\n    return new GenericClass\u003cT>(/* ... use f */);\r\n}\r\n\r\nfunction consumeClass(c: GenericClass\u003c[string, boolean]>) { }\r\n\r\n// ERROR:\r\nconsumeClass(createClass(str => console.log(str.length)));\r\n\r\n// WORKS:\r\nconsumeClass(createClass((str, _unused_num) => console.log(str.length)));\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nNo compile error.\r\n\r\n**Actual behavior:**\r\n\r\n```plain\r\n>npx tsc TypeScriptIssueNext.ts\r\nTypeScriptIssueNext.ts:18:14 - error TS2345: Argument of type 'GenericClass\u003c[string]>' is not assignable to parameter of type 'GenericClass\u003c[string, boolean]>'.\r\n  Property '1' is missing in type '[string]' but required in type '[string, boolean]'.\r\n\r\n18 consumeClass(createClass(str => console.log(str.length)));\r\n                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n```\r\n\r\n**Playground Link:** [Link](https://www.typescriptlang.org/play/#src=type%20MyTupleItem%20%3D%20%7B%7D%3B%0Atype%20MyTuple%20%3D%20%5BMyTupleItem%2C%20...MyTupleItem%5B%5D%5D%3B%0A%0Atype%20GenericFunction%3CT%20extends%20MyTuple%3E%20%3D%20(...fromArgs%3A%20T)%20%3D%3E%20void%3B%0A%0Aclass%20GenericClass%3CT%20extends%20MyTuple%3E%20%7B%0A%20%20%20%20from%3A%20T%20%7C%20undefined%3B%0A%7D%0A%0Afunction%20createClass%3CT%20extends%20MyTuple%3E(f%3A%20GenericFunction%3CT%3E)%3A%20GenericClass%3CT%3E%20%7B%0A%20%20%20%20return%20new%20GenericClass%3CT%3E(%2F*%20...%20use%20f%20*%2F)%3B%0A%7D%0A%0Afunction%20consumeClass(c%3A%20GenericClass%3C%5Bstring%2C%20boolean%5D%3E)%20%7B%20%7D%0A%0A%2F%2F%20ERROR%3A%0AconsumeClass(createClass(str%20%3D%3E%20console.log(str.length)))%3B%0A%0A%2F%2F%20WORKS%3A%0AconsumeClass(createClass((str%2C%20num)%20%3D%3E%20console.log(str.length)))%3B%0A)","author":{"url":"https://github.com/ulrichb","@type":"Person","name":"ulrichb"},"datePublished":"2019-03-10T01:03:06Z","url":"https://github.com/microsoft/TypeScript/issues/30301"}

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:900950aa-d749-35f2-c050-71c140ddfd34
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBCE8:24645:116036D:16F39B5:6B01E387
html-safe-nonce26be447cf92dbb0e58b436f9a437ebe53197394dd2bf3d028770a10602cbaa19
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0U4OjI0NjQ1OjExNjAzNkQ6MTZGMzlCNTo2QjAxRTM4NyIsInZpc2l0b3JfaWQiOiI4NjE5ODE2NTQ5NTg0MzMxNjU1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace80de427b019eb9e40a1227cc5df464655630c55f3938049a22c8a35bbef731e
hovercard-subject-tagissue:419133082
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/30301/issue_layout
twitter:imagehttps://opengraph.githubassets.com/6b85f7a7105d8b84254168560d1f98145f3982cbb1921c742af0e4b94e95e200/microsoft/TypeScript/issues/30301
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6b85f7a7105d8b84254168560d1f98145f3982cbb1921c742af0e4b94e95e200/microsoft/TypeScript/issues/30301
og:image:altTypeScript Version: 3.4.0-dev.20190309 Search Terms: 3.4 tuple lambda Code The following snippet compiles fine in TS 3.3 whereas it emits an error in TS 3.4. type MyTupleItem = {}; type MyTuple = [...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameulrichb
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/30301#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F30301
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%2F30301
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/30301
Reloadhttps://github.com/microsoft/TypeScript/issues/30301
Reloadhttps://github.com/microsoft/TypeScript/issues/30301
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests312 (312)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/30301
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/30301
Regression for omitted lambda parameter with tuple argshttps://github.com/microsoft/TypeScript/issues/30301#top
https://github.com/ahejlsberg
Working as IntendedThe behavior described is the intended behavior; this is not a bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%22
https://github.com/ulrichb
ulrichbhttps://github.com/ulrichb
on Mar 10, 2019https://github.com/microsoft/TypeScript/issues/30301#issue-419133082
Linkhttps://www.typescriptlang.org/play/#src=type%20MyTupleItem%20%3D%20%7B%7D%3B%0Atype%20MyTuple%20%3D%20%5BMyTupleItem%2C%20...MyTupleItem%5B%5D%5D%3B%0A%0Atype%20GenericFunction%3CT%20extends%20MyTuple%3E%20%3D%20(...fromArgs%3A%20T)%20%3D%3E%20void%3B%0A%0Aclass%20GenericClass%3CT%20extends%20MyTuple%3E%20%7B%0A%20%20%20%20from%3A%20T%20%7C%20undefined%3B%0A%7D%0A%0Afunction%20createClass%3CT%20extends%20MyTuple%3E(f%3A%20GenericFunction%3CT%3E)%3A%20GenericClass%3CT%3E%20%7B%0A%20%20%20%20return%20new%20GenericClass%3CT%3E(%2F*%20...%20use%20f%20*%2F)%3B%0A%7D%0A%0Afunction%20consumeClass(c%3A%20GenericClass%3C%5Bstring%2C%20boolean%5D%3E)%20%7B%20%7D%0A%0A%2F%2F%20ERROR%3A%0AconsumeClass(createClass(str%20%3D%3E%20console.log(str.length)))%3B%0A%0A%2F%2F%20WORKS%3A%0AconsumeClass(createClass((str%2C%20num)%20%3D%3E%20console.log(str.length)))%3B%0A
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Mar 12, 2019https://github.com/microsoft/TypeScript/issues/30301#event-2197953131
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Mar 12, 2019https://github.com/microsoft/TypeScript/issues/30301#issuecomment-472106608
Anders Hejlsberg (@ahejlsberg)https://github.com/ahejlsberg
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.5.0https://github.com/microsoft/TypeScript/milestone/89
on Mar 19, 2019https://github.com/microsoft/TypeScript/issues/30301#event-2214431485
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on Mar 19, 2019https://github.com/microsoft/TypeScript/issues/30301#event-2214431681
https://github.com/ulrichb
ulrichbhttps://github.com/ulrichb
on Mar 28, 2019https://github.com/microsoft/TypeScript/issues/30301#issuecomment-477743842
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Mar 28, 2019https://github.com/microsoft/TypeScript/issues/30301#issuecomment-477805488
https://github.com/ulrichb
ulrichbhttps://github.com/ulrichb
on Mar 28, 2019https://github.com/microsoft/TypeScript/issues/30301#issuecomment-477806098
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.5.0https://github.com/microsoft/TypeScript/milestone/89
TypeScript 3.6.0https://github.com/microsoft/TypeScript/milestone/93
on Jun 12, 2019https://github.com/microsoft/TypeScript/issues/30301#event-2407838103
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
TypeScript 3.6.0https://github.com/microsoft/TypeScript/milestone/93
TypeScript 3.6.1https://github.com/microsoft/TypeScript/milestone/100
on Jul 19, 2019https://github.com/microsoft/TypeScript/issues/30301#event-2496525783
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.6.1https://github.com/microsoft/TypeScript/milestone/100
TypeScript 3.7.0https://github.com/microsoft/TypeScript/milestone/98
on Sep 25, 2019https://github.com/microsoft/TypeScript/issues/30301#event-2662710843
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.7.0https://github.com/microsoft/TypeScript/milestone/98
TypeScript 3.7.1https://github.com/microsoft/TypeScript/milestone/105
on Oct 14, 2019https://github.com/microsoft/TypeScript/issues/30301#event-2711297131
https://github.com/ahejlsberg
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Oct 21, 2019https://github.com/microsoft/TypeScript/issues/30301#issuecomment-544746262
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Working as IntendedThe behavior described is the intended behavior; this is not a bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%22
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on Oct 21, 2019https://github.com/microsoft/TypeScript/issues/30301#event-2731547980
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
TypeScript 3.7.1https://github.com/microsoft/TypeScript/milestone/105
on Oct 21, 2019https://github.com/microsoft/TypeScript/issues/30301#event-2731548061
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 21, 2019https://github.com/microsoft/TypeScript/issues/30301#event-2731548237
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Oct 21, 2019https://github.com/microsoft/TypeScript/issues/30301#issuecomment-544748233
Anders Hejlsberg (@ahejlsberg)https://github.com/ahejlsberg
#33020https://github.com/microsoft/TypeScript/pull/33020
Wesley Wigham (weswigham)https://github.com/weswigham
on Oct 30, 2019https://github.com/microsoft/TypeScript/issues/30301#event-2757520866
Add example from discussion on microsoft#30301https://github.com/weswigham/TypeScript/commit/cbc713d6072e194010a17282a4f02116d1655119
microsoft#30301https://github.com/microsoft/TypeScript/issues/30301
cbc713dhttps://github.com/weswigham/TypeScript/commit/cbc713d6072e194010a17282a4f02116d1655119
Report generic rest parameters as unreliable variance positions (#33020)https://github.com/microsoft/TypeScript/commit/7b02c635b60d55e61c8229a99984d3da28dd5ba9
#33020https://github.com/microsoft/TypeScript/pull/33020
7b02c63https://github.com/microsoft/TypeScript/commit/7b02c635b60d55e61c8229a99984d3da28dd5ba9
microsofthttps://github.com/microsoft
on Oct 21, 2025https://github.com/microsoft/TypeScript/issues/30301#event-20415916348
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/30301
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/30301
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Working as IntendedThe behavior described is the intended behavior; this is not a bughttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Working%20as%20Intended%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.