Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript 4.0: Allow spread in the middle of tuples #11753

Merged

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Jun 27, 2020

Q                       A
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature? Yes
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

https://devblogs.microsoft.com/typescript/announcing-typescript-4-0-beta/#variadic-tuple-types

Example:

type Strings = [string, string];
type Numbers = [number, number];

// [string, string, number, number]
type StrStrNumNum = [...Strings, ...Numbers];

Note: currently the node is called TSRestType and not TSSpreadType. I think we should rename it in the future.

Merged to #11760, not landed in main yet.

@nicolo-ribaudo nicolo-ribaudo added the PR: New Feature 🚀 A type of pull request used for our changelog categories label Jun 27, 2020
@nicolo-ribaudo nicolo-ribaudo added this to the 7.11.0 milestone Jun 27, 2020
@nicolo-ribaudo nicolo-ribaudo requested a review from a team June 27, 2020 13:06
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 27, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 97c649a:

Sandbox Source
great-drake-r3fbb Configuration
async-bash-stc5v Configuration

@babel-bot
Copy link
Collaborator

babel-bot commented Jun 27, 2020

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/24777/

@DanielRosenwasser
Copy link
Member

@weswigham @ahejlsberg anything special here? Looks reasonable to me

@weswigham
Copy link

Only question I'd have is if this plays well with the labeled tuple member support.

@nicolo-ribaudo
Copy link
Member Author

Only question I'd have is if this plays well with the labeled tuple member support.

There is a disable test in the other PR to test the integration between these 👍

@nicolo-ribaudo
Copy link
Member Author

I'm merging this to a feat-7.11.0/ts-4.0 branch so that we can test the PRs together before merging them to main.

@nicolo-ribaudo nicolo-ribaudo added the PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release label Jun 29, 2020
@nicolo-ribaudo nicolo-ribaudo changed the base branch from main to feat-7.11.0/ts-4.0 June 29, 2020 23:04
@nicolo-ribaudo nicolo-ribaudo merged commit bb8027a into babel:feat-7.11.0/ts-4.0 Jun 29, 2020
@nicolo-ribaudo nicolo-ribaudo deleted the ts-4.0/tuple-spread branch June 29, 2020 23:04
@nicolo-ribaudo nicolo-ribaudo mentioned this pull request Jun 29, 2020
4 tasks
fisker added a commit to prettier/prettier that referenced this pull request Aug 1, 2020
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 29, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: New Feature 🚀 A type of pull request used for our changelog categories PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants