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 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 this to the 7.11.0 milestone Jun 27, 2020
@nicolo-ribaudo nicolo-ribaudo requested a review from babel/typescript Jun 27, 2020
@codesandbox
Copy link

codesandbox 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

DanielRosenwasser commented Jun 29, 2020

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

@weswigham
Copy link

weswigham commented Jun 29, 2020

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

@nicolo-ribaudo
Copy link
Member Author

nicolo-ribaudo commented Jun 29, 2020

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

nicolo-ribaudo commented Jun 29, 2020

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 changed the base branch from main to feat-7.11.0/ts-4.0 Jun 29, 2020
@nicolo-ribaudo nicolo-ribaudo merged commit bb8027a into babel:feat-7.11.0/ts-4.0 Jun 29, 2020
8 of 9 checks passed
8 of 9 checks passed
build
Details
test262-pr Workflow: test262-pr
Details
Gitpod Open an online workspace in Gitpod
Details
Travis CI - Pull Request Build Passed
Details
babel/repl REPL preview is available
Details
build-standalone Workflow: build-standalone
Details
ci/codesandbox Building packages succeeded.
Details
codecov/project 91.85% (target 90.00%)
Details
e2e Workflow: e2e
Details
@nicolo-ribaudo nicolo-ribaudo deleted the nicolo-ribaudo:ts-4.0/tuple-spread branch Jun 29, 2020
@nicolo-ribaudo nicolo-ribaudo mentioned this pull request Jun 29, 2020
4 of 4 tasks complete
fisker added a commit to prettier/prettier that referenced this pull request Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.