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

test(TypeScript): test ...infer type with parens #9056

Merged
merged 1 commit into from Aug 26, 2020

Conversation

brodybits
Copy link
Contributor

In followup to PR #9044, I was thinking it may be good to test that these cases continue to be handled correctly:

// should remove parens from this, to avoid a type issue with TypeScript 4.0:
type Tail2<T extends any[]> = T extends [infer U, ...(infer R)] ? R : never;

// but not remove parens from this:
type Tail3<T extends any[]> = T extends [infer U, ...(infer R)[]] ? R : never;

Try the playground for this PR

@fisker fisker merged commit 77c8da7 into prettier:master Aug 26, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2021
Sign up for free to 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.

None yet

3 participants