From 0858933dce6cd3bb2cd0973c78a1f61d229dfba9 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 19 Jun 2021 02:37:41 +0300 Subject: [PATCH] fix(44637): add spaces between exports assignment equal token (#44655) --- src/services/formatting/rules.ts | 3 +++ tests/cases/fourslash/formatExportAssignment.ts | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 tests/cases/fourslash/formatExportAssignment.ts 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';`);