HomePhabricator

clang-format: [JS] do not wrap after `asserts`

Authored by mprobst on Apr 21 2021, 6:43 AM.

Description

clang-format: [JS] do not wrap after asserts

asserts is a pseudo keyword in TypeScript used in return types.
Wrapping after it triggers automatic semicolon insertion, which
breaks the code semantics/syntax.

asserts is different from other pseudo keywords in that it is
specific to TS and only carries meaning in a very specific location.
Thus introducing a token type is probably overkill.

Differential Revision: https://reviews.llvm.org/D100953

Details