File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6907,7 +6907,7 @@ namespace ts {
69076907 }
69086908 }
69096909
6910- function isFunctionExpressionOrArrowFunction(node: Node): boolean {
6910+ function isFunctionExpressionOrArrowFunction(node: Node): node is FunctionExpression {
69116911 return node.kind === SyntaxKind.FunctionExpression || node.kind === SyntaxKind.ArrowFunction;
69126912 }
69136913
@@ -6926,8 +6926,8 @@ namespace ts {
69266926 function getContextualSignature(node: FunctionExpression | MethodDeclaration): Signature {
69276927 Debug.assert(node.kind !== SyntaxKind.MethodDeclaration || isObjectLiteralMethod(node));
69286928 let type = isObjectLiteralMethod(node)
6929- ? getContextualTypeForObjectLiteralMethod(<MethodDeclaration> node)
6930- : getContextualType(<FunctionExpression> node);
6929+ ? getContextualTypeForObjectLiteralMethod(node)
6930+ : getContextualType(node);
69316931 if (!type) {
69326932 return undefined;
69336933 }
@@ -13656,7 +13656,7 @@ namespace ts {
1365613656 forEach(node.decorators, checkFunctionAndClassExpressionBodies);
1365713657 forEach((<MethodDeclaration>node).parameters, checkFunctionAndClassExpressionBodies);
1365813658 if (isObjectLiteralMethod(node)) {
13659- checkFunctionExpressionOrObjectLiteralMethodBody(<MethodDeclaration> node);
13659+ checkFunctionExpressionOrObjectLiteralMethodBody(node);
1366013660 }
1366113661 break;
1366213662 case SyntaxKind.Constructor:
Original file line number Diff line number Diff line change @@ -660,7 +660,7 @@ namespace ts {
660660 return node && node . kind === SyntaxKind . Block && isFunctionLike ( node . parent ) ;
661661 }
662662
663- export function isObjectLiteralMethod ( node : Node ) {
663+ export function isObjectLiteralMethod ( node : Node ) : node is MethodDeclaration {
664664 return node && node . kind === SyntaxKind . MethodDeclaration && node . parent . kind === SyntaxKind . ObjectLiteralExpression ;
665665 }
666666
You can’t perform that action at this time.
0 commit comments