This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] do not wrap before any `is`.
ClosedPublic

Authored by mprobst on May 22 2018, 3:32 AM.

Details

Summary

is type annotations can occur at any nesting level. For example:

function x() {
  return function y(): a is B { ... };
}

Breaking before the is above breaks TypeScript parsing the code. This
change prevents the wrap.

Diff Detail

Repository
rC Clang

Event Timeline

mprobst created this revision.May 22 2018, 3:32 AM
krasimir accepted this revision.May 22 2018, 3:40 AM
This revision is now accepted and ready to land.May 22 2018, 3:40 AM
This revision was automatically updated to reflect the committed changes.