From 427e6ed3e6e71154bcb01fa6c89b788751a4abfe Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Tue, 20 Feb 2018 16:46:03 -0800 Subject: [PATCH] Tidy isAmbientModule --- src/compiler/utilities.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 863e8107f33..7fb4f0bfcba 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -425,8 +425,8 @@ namespace ts { } export function isAmbientModule(node: Node): boolean { - return node && node.kind === SyntaxKind.ModuleDeclaration && - ((node).name.kind === SyntaxKind.StringLiteral || isGlobalScopeAugmentation(node)); + return node && isModuleDeclaration(node) && + (node.name.kind === SyntaxKind.StringLiteral || isGlobalScopeAugmentation(node)); } export function isModuleWithStringLiteralName(node: Node): node is ModuleDeclaration {