From bf4b63d3ba0e318ada17ae05ccdda5a007c11405 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 8ec821cb665..9a06a49370e 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1071,8 +1071,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) ||