mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
fix error on globalThis type extend (#30460)
* Add test for extend globalThis * Fix compile aborting
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
d0646a629a
commit
18b8625ef8
@@ -27980,8 +27980,8 @@ namespace ts {
|
||||
|
||||
// The following checks only apply on a non-ambient instantiated module declaration.
|
||||
if (symbol.flags & SymbolFlags.ValueModule
|
||||
&& symbol.declarations.length > 1
|
||||
&& !inAmbientContext
|
||||
&& symbol.declarations.length > 1
|
||||
&& isInstantiatedModule(node, !!compilerOptions.preserveConstEnums || !!compilerOptions.isolatedModules)) {
|
||||
const firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol);
|
||||
if (firstNonAmbientClassOrFunc) {
|
||||
|
||||
Reference in New Issue
Block a user