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

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

    public static async *method2() {
    }

    ["method3"]?() {
    }

    method4<T>() {
    }

    "method5"() {
    }

    6() {
        // testing
    }

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

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

    get getSet(): string {
    }

    set getSet(value: string) {
    }
}

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

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

    public static async *method2() {
    }

    ["method3"]?() {
    }

    method4<T>() {
    }

    "method5"() {
    }

    6() {
        // testing
    }

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

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

    get getSet(): string {
    }

    set getSet(value: string) {
    }
}

== should format the return type as hanging when it's hanging ==
class Test {
    method(param: string): test | other | number {
    }
}

[expect]
class Test {
    method(param: string): test | 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) {
    }
}
