~~ lineWidth: 50 ~~
== should format different kinds of class methods ==
abstract class Test extends Base {
    constructor() {
        super(5, 4);
    }

    @dec
    public static override async method1(): 2 {
        // test
    }

    public static async *method2() {
    }

    ["method3"]?() {
    }

    method4<T>() {
    }

    "method5"() {
    }

    6() {
        // testing
    }

    method7() {
        console.log("test");
    }

    method8(): string | number | string | number | string {
    }

    method9?() {
    }

    get getSet(): string {
    }

    set getSet(value: string) {
    }

    public abstract async test(): Promise<number>;
}

[expect]
abstract class Test extends Base {
    constructor() {
        super(5, 4);
    }

    @dec
    public static override async method1(): 2 {
        // test
    }

    public static async *method2() {
    }

    ["method3"]?() {
    }

    method4<T>() {
    }

    "method5"() {
    }

    6() {
        // testing
    }

    method7() {
        console.log("test");
    }

    method8():
        | string
        | number
        | string
        | number
        | string
    {
    }

    method9?() {
    }

    get getSet(): string {
    }

    set getSet(value: string) {
    }

    public abstract async test(): Promise<number>;
}

== should format as multi-line when the return type extends past the line width ==
class Test {
    method(param: string): testt | other | number {
    }
}

[expect]
class Test {
    method(
        param: string,
    ): testt | other | number {
    }
}

== should force multi-line parameters when exceeding the line width ==
class Test {
    test(testing, thisOut, byExceeding, theLineWidth) {
    }
}

[expect]
class Test {
    test(
        testing,
        thisOut,
        byExceeding,
        theLineWidth,
    ) {
    }
}

== should not be multi-line when not exceeding the line width ==
class Test {
    test(testing, this) {
    }
}

[expect]
class Test {
    test(testing, this) {
    }
}
