From c8bdddf4fd6c45cbf7cfdeafef89ceee589724e8 Mon Sep 17 00:00:00 2001 From: Evan Cahill Date: Mon, 26 Aug 2019 11:29:57 -0700 Subject: [PATCH] Allow export declaration to reference const enums --- src/compiler/checker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ed3057895fa..057ac1e0d49 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -27464,7 +27464,7 @@ namespace ts { (node.parent.kind === SyntaxKind.ElementAccessExpression && (node.parent).expression === node) || ((node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName) && isInRightSideOfImportOrExportAssignment(node) || (node.parent.kind === SyntaxKind.TypeQuery && (node.parent).exprName === node)) || - (node.parent.kind === SyntaxKind.ExportSpecifier && (compilerOptions.preserveConstEnums || node.flags & NodeFlags.Ambient)); // We allow reexporting const enums + (node.parent.kind === SyntaxKind.ExportSpecifier); // We allow reexporting const enums if (!ok) { error(node, Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query);