Skip to content

Commit e8b6615

Browse files
committed
update types
1 parent 35ded51 commit e8b6615

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/compiler/transformers/declarations.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ namespace ts {
6363
let enclosingDeclaration: Node;
6464
let necessaryTypeReferences: Map<true> | undefined;
6565
let lateMarkedStatements: LateVisibilityPaintedStatement[] | undefined;
66-
let lateStatementReplacementMap: Map<VisitResult<LateVisibilityPaintedStatement>>;
66+
let lateStatementReplacementMap: Map<VisitResult<LateVisibilityPaintedStatement | ExportAssignment>>;
6767
let suppressNewDiagnosticContexts: boolean;
6868
let exportedModulesFromDeclarationEmit: Symbol[] | undefined;
6969

@@ -701,12 +701,12 @@ namespace ts {
701701
}
702702
}
703703

704-
function isExternalModuleIndicator(result: LateVisibilityPaintedStatement) {
704+
function isExternalModuleIndicator(result: LateVisibilityPaintedStatement | ExportAssignment) {
705705
// Exported top-level member indicates moduleness
706706
return isAnyImportOrReExport(result) || isExportAssignment(result) || hasModifier(result, ModifierFlags.Export);
707707
}
708708

709-
function needsScopeMarker(result: LateVisibilityPaintedStatement) {
709+
function needsScopeMarker(result: LateVisibilityPaintedStatement | ExportAssignment) {
710710
return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasModifier(result, ModifierFlags.Export) && !isAmbientModule(result);
711711
}
712712

@@ -1228,8 +1228,6 @@ namespace ts {
12281228
return preserveJsDoc(updateEnumMember(m, m.name, constValue !== undefined ? createLiteral(constValue) : undefined), m);
12291229
}))));
12301230
}
1231-
case SyntaxKind.ExportAssignment:
1232-
return;
12331231
}
12341232
// Anything left unhandled is an error, so this should be unreachable
12351233
return Debug.assertNever(input, `Unhandled top-level node in declaration emit: ${(ts as any).SyntaxKind[(input as any).kind]}`);

src/compiler/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3511,8 +3511,7 @@ namespace ts {
35113511
| ModuleDeclaration
35123512
| TypeAliasDeclaration
35133513
| InterfaceDeclaration
3514-
| EnumDeclaration
3515-
| ExportAssignment;
3514+
| EnumDeclaration;
35163515

35173516
/* @internal */
35183517
export interface SymbolVisibilityResult {

0 commit comments

Comments
 (0)