~~ trailingCommas: always, lineWidth: 40 ~~
== should not do a trailing comma in rest parameters ==
function foo(
    a: A,
    b: B,
    ...c: C
): void {}

[expect]
function foo(
    a: A,
    b: B,
    ...c: C
): void {}

== should not do a trailing comma in array patterns ==
const [a, b] = [1, 2, 3];
const [a, ...b] = [1, 2, 3];

[expect]
const [a, b,] = [1, 2, 3,];
const [a, ...b] = [1, 2, 3,];

== should not do a trailing comma in object patterns ==
const { a, b } = {};
const { a, ...b } = {};

[expect]
const { a, b, } = {};
const { a, ...b } = {};

== should not use trailing commas on a dynamic import ==
const ttttesssttt = import("testttttttt");

[expect]
const ttttesssttt = import(
    "testttttttt"
);

== should not use trailing commas in a rest param in arrow functions ==
const test = (
    a: A,
    b: B,
    ...c: C
): void => {
    test;
};

[expect]
const test = (
    a: A,
    b: B,
    ...c: C
): void => {
    test;
};

== should not use trailing comma in type argument in class decl ==
export class DocumentCollection<
    T extends object = any,
> extends BaseCollection<
    T
> {}

[expect]
export class DocumentCollection<
    T extends object = any,
> extends BaseCollection<
    T
> {}

== should not use trailing comma in type argument in class expr ==
const t = class DocumentCollection<
    T extends object = any,
> extends BaseCollection<
    T
> {}

[expect]
const t = class DocumentCollection<
    T extends object = any,
> extends BaseCollection<
    T
> {};
