Merge pull request #22087 from amcasey/AmbientModuleImports

Organize imports in ambient modules
This commit is contained in:
Andrew Casey authored and GitHub committed 2018-02-23 17:43:28 -08:00
commit b31aa4e012
5 files changed
+129 -36

No files matched your search

+2 -2
View File
@@ -425,8 +425,8 @@ namespace ts {
}
export function isAmbientModule(node: Node): boolean {
return node && node.kind === SyntaxKind.ModuleDeclaration &&
((<ModuleDeclaration>node).name.kind === SyntaxKind.StringLiteral || isGlobalScopeAugmentation(<ModuleDeclaration>node));
return node && isModuleDeclaration(node) &&
(node.name.kind === SyntaxKind.StringLiteral || isGlobalScopeAugmentation(node));
}
export function isModuleWithStringLiteralName(node: Node): node is ModuleDeclaration {