Pass ignoreErrors=true to more resolveEntityName callers (#61144)

This commit is contained in:
Jake Bailey
2025-02-10 09:26:52 -08:00
committed by GitHub
parent 34ea32f8ce
commit e1629e540e

View File

@@ -49148,11 +49148,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
}
else if (isEntityName(name) && isTypeReferenceIdentifier(name)) {
const meaning = name.parent.kind === SyntaxKind.TypeReference ? SymbolFlags.Type : SymbolFlags.Namespace;
const symbol = resolveEntityName(name, meaning, /*ignoreErrors*/ false, /*dontResolveAlias*/ true);
const symbol = resolveEntityName(name, meaning, /*ignoreErrors*/ true, /*dontResolveAlias*/ true);
return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name);
}
if (name.parent.kind === SyntaxKind.TypePredicate) {
return resolveEntityName(name as Identifier, /*meaning*/ SymbolFlags.FunctionScopedVariable);
return resolveEntityName(name as Identifier, /*meaning*/ SymbolFlags.FunctionScopedVariable, /*ignoreErrors*/ true);
}
return undefined;
}
@@ -49383,7 +49383,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
function getShorthandAssignmentValueSymbol(location: Node | undefined): Symbol | undefined {
if (location && location.kind === SyntaxKind.ShorthandPropertyAssignment) {
return resolveEntityName((location as ShorthandPropertyAssignment).name, SymbolFlags.Value | SymbolFlags.Alias);
return resolveEntityName((location as ShorthandPropertyAssignment).name, SymbolFlags.Value | SymbolFlags.Alias, /*ignoreErrors*/ true);
}
return undefined;
}
@@ -49395,10 +49395,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
return node.parent.parent.moduleSpecifier ?
getExternalModuleMember(node.parent.parent, node) :
name.kind === SyntaxKind.StringLiteral ? undefined : // Skip for invalid syntax like this: export { "x" }
resolveEntityName(name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias);
resolveEntityName(name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias, /*ignoreErrors*/ true);
}
else {
return resolveEntityName(node, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias);
return resolveEntityName(node, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias, /*ignoreErrors*/ true);
}
}