diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3cf7528abbe..603d9c6dea0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -19958,7 +19958,7 @@ namespace ts { function getAmbientModules(): Symbol[] { const result: Symbol[] = []; for (const sym in globals) { - if (hasProperty(globals, sym) && ambientModuleSymbolRegex.test(sym)) { + if (ambientModuleSymbolRegex.test(sym)) { result.push(globals[sym]); } }