From 34a0deb5618722fb4c65a762127534b1ca101d78 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 1 Feb 2016 13:28:58 -0800 Subject: [PATCH] Only error on 'export =' declarations. --- src/compiler/program.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 42c5973d1fb..efb18f0a6ed 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -734,8 +734,11 @@ namespace ts { diagnostics.push(createDiagnosticForNode(node, Diagnostics.import_can_only_be_used_in_a_ts_file)); return true; case SyntaxKind.ExportAssignment: - diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_a_ts_file)); - return true; + if ((node).isExportEquals) { + diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_a_ts_file)); + return true; + } + break; case SyntaxKind.ClassDeclaration: let classDeclaration = node; if (checkModifiers(classDeclaration.modifiers) ||