mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 17:27:54 -05:00
this: undefined in modules (#37784)
It's always supposed to have been this way, but I was worried about how breaky the change would be when adding globalThisType. This PR is experiment to see how much. Fixes #35882 maybe
This commit is contained in:
committed by
GitHub
parent
167f954ec7
commit
12cd15c867
@@ -21660,6 +21660,10 @@ namespace ts {
|
||||
const fileSymbol = getSymbolOfNode(container);
|
||||
return fileSymbol && getTypeOfSymbol(fileSymbol);
|
||||
}
|
||||
else if (container.externalModuleIndicator) {
|
||||
// TODO: Maybe issue a better error than 'object is possibly undefined'
|
||||
return undefinedType;
|
||||
}
|
||||
else if (includeGlobalThis) {
|
||||
return getTypeOfSymbol(globalThisSymbol);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user