Skip to content

Commit bf4b63d

Browse files
Only error on 'export =' declarations.
1 parent dd0a2e0 commit bf4b63d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/compiler/program.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,8 +1071,11 @@ namespace ts {
10711071
diagnostics.push(createDiagnosticForNode(node, Diagnostics.import_can_only_be_used_in_a_ts_file));
10721072
return true;
10731073
case SyntaxKind.ExportAssignment:
1074-
diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_a_ts_file));
1075-
return true;
1074+
if ((<ExportAssignment>node).isExportEquals) {
1075+
diagnostics.push(createDiagnosticForNode(node, Diagnostics.export_can_only_be_used_in_a_ts_file));
1076+
return true;
1077+
}
1078+
break;
10761079
case SyntaxKind.ClassDeclaration:
10771080
let classDeclaration = <ClassDeclaration>node;
10781081
if (checkModifiers(classDeclaration.modifiers) ||

0 commit comments

Comments
 (0)