update types

This commit is contained in:
王文璐
2019-03-22 18:13:18 +08:00
parent 35ded510bb
commit e8b6615c2c
2 changed files with 4 additions and 7 deletions

View File

@@ -63,7 +63,7 @@ namespace ts {
let enclosingDeclaration: Node;
let necessaryTypeReferences: Map<true> | undefined;
let lateMarkedStatements: LateVisibilityPaintedStatement[] | undefined;
let lateStatementReplacementMap: Map<VisitResult<LateVisibilityPaintedStatement>>;
let lateStatementReplacementMap: Map<VisitResult<LateVisibilityPaintedStatement | ExportAssignment>>;
let suppressNewDiagnosticContexts: boolean;
let exportedModulesFromDeclarationEmit: Symbol[] | undefined;
@@ -701,12 +701,12 @@ namespace ts {
}
}
function isExternalModuleIndicator(result: LateVisibilityPaintedStatement) {
function isExternalModuleIndicator(result: LateVisibilityPaintedStatement | ExportAssignment) {
// Exported top-level member indicates moduleness
return isAnyImportOrReExport(result) || isExportAssignment(result) || hasModifier(result, ModifierFlags.Export);
}
function needsScopeMarker(result: LateVisibilityPaintedStatement) {
function needsScopeMarker(result: LateVisibilityPaintedStatement | ExportAssignment) {
return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasModifier(result, ModifierFlags.Export) && !isAmbientModule(result);
}
@@ -1228,8 +1228,6 @@ namespace ts {
return preserveJsDoc(updateEnumMember(m, m.name, constValue !== undefined ? createLiteral(constValue) : undefined), m);
}))));
}
case SyntaxKind.ExportAssignment:
return;
}
// Anything left unhandled is an error, so this should be unreachable
return Debug.assertNever(input, `Unhandled top-level node in declaration emit: ${(ts as any).SyntaxKind[(input as any).kind]}`);

View File

@@ -3511,8 +3511,7 @@ namespace ts {
| ModuleDeclaration
| TypeAliasDeclaration
| InterfaceDeclaration
| EnumDeclaration
| ExportAssignment;
| EnumDeclaration;
/* @internal */
export interface SymbolVisibilityResult {