mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Revert "🤖 Pick PR #59285 (Fix captured shorthand properties i...) into release-5.5 (#59288)" (#59305)
This commit is contained in:
@@ -49242,7 +49242,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 = getResolvedSymbol(node);
|
||||
const s = getSymbolAtLocation(node, /*ignoreErrors*/ true);
|
||||
if (s && s !== unknownSymbol) {
|
||||
checkIdentifierCalculateNodeCheckFlags(node, s);
|
||||
}
|
||||
|
||||
@@ -3493,7 +3493,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 ?? (parent as ShorthandPropertyAssignment).name) === node;
|
||||
return (parent as ShorthandPropertyAssignment).objectAssignmentInitializer === node;
|
||||
case SyntaxKind.SatisfiesExpression:
|
||||
return node === (parent as SatisfiesExpression).expression;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user