clang-format: [JS] Fix incorrect detection of ternary expressions.

A definintion like this could not be formatted at all:
  constructor({aa}: {
    aa?: string,
    aaaaaaaa?: string,
    aaaaaaaaaaaaaaa?: boolean,
    aaaaaa?: List<string>
  }) {
  }

llvm-svn: 238291
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index d5625a2..a06daac 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -753,6 +753,13 @@
                "  y?(): z;\n"
                "}");
   verifyFormat("x ? 1 : 2;");
+  verifyFormat("constructor({aa}: {\n"
+               "  aa?: string,\n"
+               "  aaaaaaaa?: string,\n"
+               "  aaaaaaaaaaaaaaa?: boolean,\n"
+               "  aaaaaa?: List<string>\n"
+               "}) {\n"
+               "}");
 }
 
 TEST_F(FormatTestJS, IndexSignature) {