== should not keep trailing comma in expression type parameters in non-jsx file since there is no parsing ambiguity ==
const Test1 = <T,>() => false;
const Test2 = function<T,>() {};

[expect]
const Test1 = <T>() => false;
const Test2 = function<T>() {};

== should keep trailing comma in expression type parameters in file parsed as jsx since there is no parsing ambiguity ==
const Test1 = <T,>() => false;
const Test2 = function<T,>() {};
const Test3 = <div></div>;

// not for declarations though
function test<T,>() {
}

// or export default
export default function test<T,>() {
}
export default function<T,>() {
}

// generic constraints are not ambiguous either
const Test4 = <P extends R<S, T>,>() => {};
const Test5 = <P extends R<S, T>>() => {};

[expect]
const Test1 = <T,>() => false;
const Test2 = function<T,>() {};
const Test3 = <div></div>;

// not for declarations though
function test<T>() {
}

// or export default
export default function test<T>() {
}
export default function<T>() {
}

// generic constraints are not ambiguous either
const Test4 = <P extends R<S, T>>() => {};
const Test5 = <P extends R<S, T>>() => {};
