* @param hasContinuation Whether another `then`, `catch`, or `finally` continuation follows the continuation to which this expression belongs. * @param continuationArgName The argument name for the continuation that follows this call.
(returnContextNode, node, transformer, hasContinuation, continuationArgName)
| 151606 | * @param continuationArgName The argument name for the continuation that follows this call. |
| 151607 | */ |
| 151608 | function transformExpression(returnContextNode, node, transformer, hasContinuation, continuationArgName) { |
| 151609 | if (isPromiseReturningCallExpression(node, transformer.checker, "then")) { |
| 151610 | return transformThen(node, ts.elementAt(node.arguments, 0), ts.elementAt(node.arguments, 1), transformer, hasContinuation, continuationArgName); |
| 151611 | } |
| 151612 | if (isPromiseReturningCallExpression(node, transformer.checker, "catch")) { |
| 151613 | return transformCatch(node, ts.elementAt(node.arguments, 0), transformer, hasContinuation, continuationArgName); |
| 151614 | } |
| 151615 | if (isPromiseReturningCallExpression(node, transformer.checker, "finally")) { |
| 151616 | return transformFinally(node, ts.elementAt(node.arguments, 0), transformer, hasContinuation, continuationArgName); |
| 151617 | } |
| 151618 | if (ts.isPropertyAccessExpression(node)) { |
| 151619 | return transformExpression(returnContextNode, node.expression, transformer, hasContinuation, continuationArgName); |
| 151620 | } |
| 151621 | var nodeType = transformer.checker.getTypeAtLocation(node); |
| 151622 | if (nodeType && transformer.checker.getPromisedTypeOfPromise(nodeType)) { |
| 151623 | ts.Debug.assertNode(ts.getOriginalNode(node).parent, ts.isPropertyAccessExpression); |
| 151624 | return transformPromiseExpressionOfPropertyAccess(returnContextNode, node, transformer, hasContinuation, continuationArgName); |
| 151625 | } |
| 151626 | return silentFail(); |
| 151627 | } |
| 151628 | function isNullOrUndefined(_a, node) { |
| 151629 | var checker = _a.checker; |
| 151630 | if (node.kind === 104 /* SyntaxKind.NullKeyword */) |
no test coverage detected