~~ lineWidth: 40 ~~
== should format a single line statement ==
const t = ()   =>   7;

[expect]
const t = () => 7;

== should format with everything ==
const t = async <T, U>(p, u): s =>
{
};

[expect]
const t = async <T, U>(p, u): s => {
};

== should keep the body on a single line when formatted that way ==
const t = () => {   };

[expect]
const t = () => {};

== should support multiple line expressions ==
const t = () => true || false || true || false;

[expect]
const t = () =>
    true || false || true || false;

== should allow arrow functions without parens ==
const t = a => 5;

[expect]
const t = a => 5;

== should use parens when specified ==
const t = (a) => 5;

[expect]
const t = (a) => 5;

== should use parens when there is a type ==
const t = (a: string) => 5;

[expect]
const t = (a: string) => 5;

== should use parens when async and no parens ==
const t = async () => 5;

[expect]
const t = async () => 5;

== should not use parens when async and has no parens ==
const t = async a => 5;

[expect]
const t = async a => 5;

== should format the params as multi-line when the return type exceeds the line width ==
const t = (test: s, other): testing | thisOutMore => {

}

[expect]
const t = (
    test: s,
    other,
): testing | thisOutMore => {
};

== should format the return type on the same line when the rest of the header is multi-line ==
const testing = (param: string, other: number): testing | this => {
}

[expect]
const testing = (
    param: string,
    other: number,
): testing | this => {
};

== should format the return type on a new line when it's multiple lines and the rest of the header is multi-line ==
const testing = (param: string, other: number): testing | other | other | test | test => {
}

[expect]
const testing = (
    param: string,
    other: number,
):
    | testing
    | other
    | other
    | test
    | test =>
{
};

== should format arrow function containing an object expression ==
const test = (testing, thisOut) => ({
    test: 5,
    other: 10
});

[expect]
const test = (testing, thisOut) => ({
    test: 5,
    other: 10,
});

== should not newline when the arrow is on a separate line -- previously would newline before sum, which was useless ==
const test = (testing, thisOut, somethingThatWillGo) => sum(testing, thisOut, againWithSomethingThisisLong);

[expect]
const test = (
    testing,
    thisOut,
    somethingThatWillGo,
) => sum(
    testing,
    thisOut,
    againWithSomethingThisisLong,
);

== should break up appropriately when the body is in parens ==
prefixCommon.map((c) => ({ type: DiffType.common, value: c }));

[expect]
prefixCommon.map((c) => ({
    type: DiffType.common,
    value: c,
}));

== should not keep trailing comma for type parameter with only identifier since this is not a cts or mts file ==
const x = <T,>(value: T): T => value;

[expect]
const x = <T>(value: T): T => value;
