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

Ugly TS output for type alias of a function type with generics #4238

Open
kpdonn opened this issue Apr 1, 2018 · 0 comments · May be fixed by #7217
Open

Ugly TS output for type alias of a function type with generics #4238

kpdonn opened this issue Apr 1, 2018 · 0 comments · May be fixed by #7217
Labels
lang:typescript Issues affecting TypeScript-specific constructs (not general JS issues) type:bug Issues identifying ugly output, or a defect in the program

Comments

@kpdonn
Copy link
Contributor

kpdonn commented Apr 1, 2018

Prettier 1.11.1
Playground link

--parser typescript

Input:

type FuncType<T1 extends string, T2 extends number, T3 extends number> = (
  <T4 extends string>(arg: T4) => Output<T1, T2, T3, T4>
);

Output:

type FuncType<T1 extends string, T2 extends number, T3 extends number> = <
  T4 extends string
>(
  arg: T4
) => Output<T1, T2, T3, T4>;

Expected behavior:
Similar to input format where there is a line break added after the =.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang:typescript Issues affecting TypeScript-specific constructs (not general JS issues) type:bug Issues identifying ugly output, or a defect in the program
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants