TypeScript: fix trailing comma in enum (#1938)
* fix(typescript): fix trailing comma in enum, fixes #1932 * fix(typescript): use --trailing-comma es5 for enumsmaster
parent
c57f2ab507
commit
649cec7fdd
|
@ -2459,7 +2459,8 @@ function genericPrintNoParens(path, options, print, args) {
|
|||
indent(
|
||||
concat([
|
||||
hardline,
|
||||
printArrayItems(path, options, "members", print)
|
||||
printArrayItems(path, options, "members", print),
|
||||
shouldPrintComma(options, "es5") ? "," : ""
|
||||
])
|
||||
),
|
||||
comments.printDanglingComments(
|
||||
|
|
|
@ -5,9 +5,19 @@ export class BaseSingleLevelProfileTargeting<
|
|||
T extends ValidSingleLevelProfileNode,
|
||||
> {
|
||||
}
|
||||
|
||||
enum Enum {
|
||||
x = 1,
|
||||
y = 2,
|
||||
}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
export class BaseSingleLevelProfileTargeting<
|
||||
T extends ValidSingleLevelProfileNode
|
||||
> {}
|
||||
|
||||
enum Enum {
|
||||
x = 1,
|
||||
y = 2,
|
||||
}
|
||||
|
||||
`;
|
||||
|
|
|
@ -2,3 +2,8 @@ export class BaseSingleLevelProfileTargeting<
|
|||
T extends ValidSingleLevelProfileNode,
|
||||
> {
|
||||
}
|
||||
|
||||
enum Enum {
|
||||
x = 1,
|
||||
y = 2,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue