async arrow function with multiple line generic
Closed this issue · 0 comments
acutmore commented
Describe the bug
@seralexeev has discovered an edge case that is not being handled correctly (#18).
The issue occurs for async arrow functions when the type parameters span multiple lines.
To Reproduce
Steps to reproduce the behavior:
const fn = async <
T,
U,
V
>() => null;
Expected behavior
As the input is valid TypeScript. ts-blank-space
should either mark this as an error (via on onError
callback), or it should produce valid JavaScript with the same semantics.
Actual behavior
const fn = async
() => null;
And no errors.
As per the ecma262 AsyncArrowHead
spec the async
keyword cannot be followed by a line terminator.
Playground