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 parser doesn't support type A = typeof B<C>; #12928

Closed
Tiedye opened this issue May 26, 2022 · 2 comments
Closed

Typescript parser doesn't support type A = typeof B<C>; #12928

Tiedye opened this issue May 26, 2022 · 2 comments

Comments

@Tiedye
Copy link

Tiedye commented May 26, 2022

Prettier 2.6.2
Playground link

--parser typescript

Input:

interface Generic<T> {
  prop: T;
}

type a =   typeof   Generic<T>  ;

Output:

SyntaxError: ';' expected. (5:28)
  3 | }
  4 |
> 5 | type a =   typeof   Generic<T>  ;
    |                            ^

Expected behavior:
To not error, this is valid ts in 4.7.2 at least

@alexander-akait
Copy link
Member

Fixed in master, but not release yet

@sosukesuzuki
Copy link
Member

duplicated to #12640

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants