mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix elided var handling in declaration emit visibility checks (#58605)
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
This commit is contained in:
co-authored by
TypeScript Bot
parent
11b73ecc4a
commit
6f72e24544
@@ -5862,9 +5862,16 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
return { accessibility: SymbolAccessibility.Accessible };
|
||||
}
|
||||
|
||||
if (!symbol) {
|
||||
return {
|
||||
accessibility: SymbolAccessibility.NotResolved,
|
||||
errorSymbolName: getTextOfNode(firstIdentifier),
|
||||
errorNode: firstIdentifier,
|
||||
};
|
||||
}
|
||||
// Verify if the symbol is accessible
|
||||
return (symbol && hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible)) || {
|
||||
accessibility: SymbolAccessibility.NotResolved,
|
||||
return hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) || {
|
||||
accessibility: SymbolAccessibility.NotAccessible,
|
||||
errorSymbolName: getTextOfNode(firstIdentifier),
|
||||
errorNode: firstIdentifier,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user