diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index 88922c2aaf1..76a0d348531 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -459,6 +459,9 @@ namespace ts.formatting { // equal in import a = module('a'); // falls through case SyntaxKind.ImportEqualsDeclaration: + // equal in export = 1 + // falls through + case SyntaxKind.ExportAssignment: // equal in let a = 0 // falls through case SyntaxKind.VariableDeclaration: diff --git a/tests/cases/fourslash/formatExportAssignment.ts b/tests/cases/fourslash/formatExportAssignment.ts new file mode 100644 index 00000000000..cea1e77b515 --- /dev/null +++ b/tests/cases/fourslash/formatExportAssignment.ts @@ -0,0 +1,6 @@ +/// + +////export='foo'; + +format.document(); +verify.currentFileContentIs(`export = 'foo';`);