@@ -5948,7 +5948,7 @@ namespace ts {
5948
5948
5949
5949
// Returns true if the given expression contains (at any level of nesting) a function or arrow expression
5950
5950
// that is subject to contextual typing.
5951
- function isContextSensitive(node: Expression | MethodDeclaration | ObjectLiteralElement ): boolean {
5951
+ function isContextSensitive(node: Expression | MethodDeclaration | ObjectLiteralElementLike ): boolean {
5952
5952
Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node));
5953
5953
switch (node.kind) {
5954
5954
case SyntaxKind.FunctionExpression:
@@ -9793,7 +9793,7 @@ namespace ts {
9793
9793
return getContextualTypeForObjectLiteralElement(node);
9794
9794
}
9795
9795
9796
- function getContextualTypeForObjectLiteralElement(element: ObjectLiteralElement ) {
9796
+ function getContextualTypeForObjectLiteralElement(element: ObjectLiteralElementLike ) {
9797
9797
const objectLiteral = <ObjectLiteralExpression>element.parent;
9798
9798
const type = getApparentTypeOfContextualType(objectLiteral);
9799
9799
if (type) {
@@ -9910,7 +9910,7 @@ namespace ts {
9910
9910
return getContextualTypeForBinaryOperand(node);
9911
9911
case SyntaxKind.PropertyAssignment:
9912
9912
case SyntaxKind.ShorthandPropertyAssignment:
9913
- return getContextualTypeForObjectLiteralElement(<ObjectLiteralElement >parent);
9913
+ return getContextualTypeForObjectLiteralElement(<ObjectLiteralElementLike >parent);
9914
9914
case SyntaxKind.ArrayLiteralExpression:
9915
9915
return getContextualTypeForElementExpression(node);
9916
9916
case SyntaxKind.ConditionalExpression:
@@ -13186,7 +13186,7 @@ namespace ts {
13186
13186
return sourceType;
13187
13187
}
13188
13188
13189
- function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType: Type, property: ObjectLiteralElement , contextualMapper?: TypeMapper) {
13189
+ function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType: Type, property: ObjectLiteralElementLike , contextualMapper?: TypeMapper) {
13190
13190
if (property.kind === SyntaxKind.PropertyAssignment || property.kind === SyntaxKind.ShorthandPropertyAssignment) {
13191
13191
const name = <PropertyName>(<PropertyAssignment>property).name;
13192
13192
if (name.kind === SyntaxKind.ComputedPropertyName) {
@@ -18446,7 +18446,7 @@ namespace ts {
18446
18446
// for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) {
18447
18447
if (expr.parent.kind === SyntaxKind.PropertyAssignment) {
18448
18448
const typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(<Expression>expr.parent.parent);
18449
- return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, <ObjectLiteralElement >expr.parent);
18449
+ return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, <ObjectLiteralElementLike >expr.parent);
18450
18450
}
18451
18451
// Array literal assignment - array destructuring pattern
18452
18452
Debug.assert(expr.parent.kind === SyntaxKind.ArrayLiteralExpression);
0 commit comments