mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Fix crash on non-dts-require (#19980)
This commit is contained in:
1 parent
3d602936e0
commit
7d93434f2c
5 files changed
+59
-1
No files matched your search
@@ -17179,7 +17179,7 @@ namespace ts {
|
||||
if (targetDeclarationKind !== SyntaxKind.Unknown) {
|
||||
const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind);
|
||||
// function/variable declaration should be ambient
|
||||
return !!(decl.flags & NodeFlags.Ambient);
|
||||
return !!decl && !!(decl.flags & NodeFlags.Ambient);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user