@@ -5948,7 +5948,7 @@ namespace ts {
59485948
59495949 // Returns true if the given expression contains (at any level of nesting) a function or arrow expression
59505950 // that is subject to contextual typing.
5951- function isContextSensitive(node: Expression | MethodDeclaration | ObjectLiteralElement ): boolean {
5951+ function isContextSensitive(node: Expression | MethodDeclaration | ObjectLiteralElementLike ): boolean {
59525952 Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node));
59535953 switch (node.kind) {
59545954 case SyntaxKind.FunctionExpression:
@@ -9793,7 +9793,7 @@ namespace ts {
97939793 return getContextualTypeForObjectLiteralElement(node);
97949794 }
97959795
9796- function getContextualTypeForObjectLiteralElement(element: ObjectLiteralElement ) {
9796+ function getContextualTypeForObjectLiteralElement(element: ObjectLiteralElementLike ) {
97979797 const objectLiteral = <ObjectLiteralExpression>element.parent;
97989798 const type = getApparentTypeOfContextualType(objectLiteral);
97999799 if (type) {
@@ -9910,7 +9910,7 @@ namespace ts {
99109910 return getContextualTypeForBinaryOperand(node);
99119911 case SyntaxKind.PropertyAssignment:
99129912 case SyntaxKind.ShorthandPropertyAssignment:
9913- return getContextualTypeForObjectLiteralElement(<ObjectLiteralElement >parent);
9913+ return getContextualTypeForObjectLiteralElement(<ObjectLiteralElementLike >parent);
99149914 case SyntaxKind.ArrayLiteralExpression:
99159915 return getContextualTypeForElementExpression(node);
99169916 case SyntaxKind.ConditionalExpression:
@@ -13186,7 +13186,7 @@ namespace ts {
1318613186 return sourceType;
1318713187 }
1318813188
13189- function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType: Type, property: ObjectLiteralElement , contextualMapper?: TypeMapper) {
13189+ function checkObjectLiteralDestructuringPropertyAssignment(objectLiteralType: Type, property: ObjectLiteralElementLike , contextualMapper?: TypeMapper) {
1319013190 if (property.kind === SyntaxKind.PropertyAssignment || property.kind === SyntaxKind.ShorthandPropertyAssignment) {
1319113191 const name = <PropertyName>(<PropertyAssignment>property).name;
1319213192 if (name.kind === SyntaxKind.ComputedPropertyName) {
@@ -18446,7 +18446,7 @@ namespace ts {
1844618446 // for ({ skills: { primary, secondary } } = multiRobot, i = 0; i < 1; i++) {
1844718447 if (expr.parent.kind === SyntaxKind.PropertyAssignment) {
1844818448 const typeOfParentObjectLiteral = getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(<Expression>expr.parent.parent);
18449- return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, <ObjectLiteralElement >expr.parent);
18449+ return checkObjectLiteralDestructuringPropertyAssignment(typeOfParentObjectLiteral || unknownType, <ObjectLiteralElementLike >expr.parent);
1845018450 }
1845118451 // Array literal assignment - array destructuring pattern
1845218452 Debug.assert(expr.parent.kind === SyntaxKind.ArrayLiteralExpression);
0 commit comments