~~ lineWidth: 40 ~~
== should format ==
type T = {
    m1 ( ) : number;
    m2  ? (arg, arg2:  number): number  ;
    m3 ? <T , U> (  );
    [ m4  ](): string;
};

[expect]
type T = {
    m1(): number;
    m2?(arg, arg2: number): number;
    m3?<T, U>();
    [m4](): string;
};

== should format the return type as hanging when it's hanging ==
interface T {
    method(param: string): test | number;
}

[expect]
interface T {
    method(param: string): test
        | number;
}

== should format the return type on the same line when the rest of the header is hanging ==
interface T {
    method(param: string, otherTest: string): test | ing;
}

[expect]
interface T {
    method(param: string,
        otherTest: string): test | ing;
}

== should format the return type on a new line when it's hanging and the rest of the header is hanging ==
interface T {
    method(param: string, otherTest: string): test | other | other;
}

[expect]
interface T {
    method(param: string,
        otherTest: string
    ): test | other | other;
}
