Skip to content

Conversation

@jablko
Copy link
Contributor

@jablkojablko commented Sep 26, 2019

Fixes#26378
Fixes#26976

Copy link

@JessidhiaJessidhia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably need to keep at least the less-generic overload around as the first overload.

As it is, the free U parameter will prevent inference from working in cases where one is trying to build a homogeneous array; especially when the array includes function or object types that might have methods.

constfoo=[(a: string)=>a]constbar=foo.concat(b=>b)// implicit any error

@jablkojablkoforce-pushed the patch-9 branch 2 times, most recently from 337078d to eb23428CompareSeptember 27, 2019 17:54
@jablko
Copy link
ContributorAuthor

@Jessidhia Thank you for this feedback! I've now updated the PR accordingly.

@jablkojablkoforce-pushed the patch-9 branch 2 times, most recently from 34b5a8e to d24988cCompareOctober 3, 2019 17:16
@jablkojablkoforce-pushed the patch-9 branch 3 times, most recently from 47ac9d2 to 2d8c8eaCompareOctober 9, 2019 16:37
@jablkojablkoforce-pushed the patch-9 branch 2 times, most recently from 944ef0f to 0693442CompareOctober 19, 2019 18:34
@jablkojablkoforce-pushed the patch-9 branch 2 times, most recently from 5336214 to 40063feCompareNovember 16, 2019 15:24
@jablkojablkoforce-pushed the patch-9 branch 5 times, most recently from 50c57c6 to 3ec86d2CompareNovember 28, 2019 14:51
@jablkojablkoforce-pushed the patch-9 branch 3 times, most recently from cbf4fc2 to dd89dbeCompareJanuary 25, 2020 20:23
@RyanCavanaugh
Copy link
Member

Rolled into #33645

@microsoftmicrosoft locked as resolved and limited conversation to collaborators Oct 21, 2025
@typescript-bot
Copy link
Collaborator

The TypeScript team hasn't accepted the linked issue #26378. If you can get it accepted, this PR will have a better chance of being reviewed.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add additional overloads to Array.prototype.concat Support concat operations on arrays of different types

4 participants

@jablko@RyanCavanaugh@typescript-bot@Jessidhia