Prettier 2.0.1
Playground link
Input:
export type A = {
a?: {
[
x: string
]: typeof SomeLongLongLongTypeName[keyof typeof SomeLongLongLongTypeName];
} | null;
};
Output:
export type A = {
a?: {
[
x: string,
]: typeof SomeLongLongLongTypeName[keyof typeof SomeLongLongLongTypeName];
} | null;
};
Expected behavior:
Keep input as-is - comma should not be added after x: string because it is invalid syntax.
Prettier 2.0.1
Playground link
Input:
Output:
Expected behavior:
Keep input as-is - comma should not be added after
x: stringbecause it is invalid syntax.