} else if (Style.Language == FormatStyle::LK_JavaScript) {
if (Right.is(Keywords.kw_function) && Left.isNot(tok::comma))
return 100;
+ if (Left.is(TT_JsTypeColon))
+ return 100;
}
if (Left.is(tok::comma) || (Right.is(tok::identifier) && Right.Next &&
verifyFormat("class C {\n static x(): string { return 'asd'; }\n}");
verifyFormat("class C extends P implements I {}");
verifyFormat("class C extends p.P implements i.I {}");
+ verifyFormat("class Test {\n"
+ " aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaa: aaaaaaaaaaaaaaaaaaaa):\n"
+ " aaaaaaaaaaaaaaaaaaaaaa {}\n"
+ "}");
// ':' is not a type declaration here.
verifyFormat("class X {\n"