[PATCH] D117197: [clang-format] Add new option to support adding a space between Javascript Union and Intersection types

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 13 02:12:08 PST 2022


curdeius accepted this revision.
curdeius added a comment.
This revision is now accepted and ready to land.

LGTM apart from nits.
I agree though that spaceRequired(Before|Between) need some refactoring love.



================
Comment at: clang/docs/ReleaseNotes.rst:327
+- Option ``SpacesInJavaScriptUnion`` has been added to allow spaces around
+  JavsScript Union and Intersection Type operators.
+
----------------
Also, why capital letters on union and intersection type?


================
Comment at: clang/include/clang/Format/Format.h:3618
+  // If ``true``, spaces will be inserted before and after the ``|`` of
+  // a JavaScript/TypeScript union
+  /// \code
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117197/new/

https://reviews.llvm.org/D117197



More information about the cfe-commits mailing list