Reputation: 13
I get a formatting mistake that when I just have formatted my ts code with Beautify Extension in VS Code, any types Array<T>
and Map<T1, T2>
will be formatted as Array < T >
and Map < T1, T2 >
. So I have to delete the space manually.
Does anyone know how to resolve this?
Before formatting:
After formatting:
Upvotes: 1
Views: 88
Reputation: 2653
js-beautify
doesn't officially support TypeScript (see this open issue tracking the extra whitespace around generic type parameters). You'll probably have more luck in general with a formatter that officially supports TS, such as prettier.
Upvotes: 1