mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
This commit is contained in:
co-authored by
Jake Bailey
parent
d5434c85f7
commit
6c7df1f324
@@ -49223,7 +49223,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
const nodeLinks = getNodeLinks(node);
|
||||
nodeLinks.calculatedFlags |= NodeCheckFlags.ConstructorReference | NodeCheckFlags.CapturedBlockScopedBinding | NodeCheckFlags.BlockScopedBindingInLoop;
|
||||
if (isIdentifier(node) && isExpressionNode(node) && !(isPropertyAccessExpression(node.parent) && node.parent.name === node)) {
|
||||
const s = getSymbolAtLocation(node, /*ignoreErrors*/ true);
|
||||
const s = getResolvedSymbol(node);
|
||||
if (s && s !== unknownSymbol) {
|
||||
checkIdentifierCalculateNodeCheckFlags(node, s);
|
||||
}
|
||||
|
||||
@@ -3492,7 +3492,7 @@ export function isInExpressionContext(node: Node): boolean {
|
||||
case SyntaxKind.ExpressionWithTypeArguments:
|
||||
return (parent as ExpressionWithTypeArguments).expression === node && !isPartOfTypeNode(parent);
|
||||
case SyntaxKind.ShorthandPropertyAssignment:
|
||||
return (parent as ShorthandPropertyAssignment).objectAssignmentInitializer === node;
|
||||
return ((parent as ShorthandPropertyAssignment).objectAssignmentInitializer ?? (parent as ShorthandPropertyAssignment).name) === node;
|
||||
case SyntaxKind.SatisfiesExpression:
|
||||
return node === (parent as SatisfiesExpression).expression;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user