diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index c60fd927872..4cc000f6e7d 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2608,7 +2608,7 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri } const preferNewLine = node.multiLine ? ListFormat.PreferNewLine : ListFormat.None; - const allowTrailingComma = currentSourceFile && currentSourceFile.languageVersion >= ScriptTarget.ES5 && !isJsonSourceFile(currentSourceFile) ? ListFormat.AllowTrailingComma : ListFormat.None; + const allowTrailingComma = currentSourceFile && !isJsonSourceFile(currentSourceFile) ? ListFormat.AllowTrailingComma : ListFormat.None; emitList(node, node.properties, ListFormat.ObjectLiteralExpressionProperties | allowTrailingComma | preferNewLine); if (indentedFlag) {