mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 20:14:05 -05:00
Tidy isAmbientModule
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user