MCPcopy Create free account
hub / github.com/nodejs/node / isPromiseHandler

Function isPromiseHandler

test/fixtures/snapshot/typescript.js:144841–144845  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

144839 }
144840 ts.isFixablePromiseHandler = isFixablePromiseHandler;
144841 function isPromiseHandler(node) {
144842 return ts.isCallExpression(node) && (ts.hasPropertyAccessExpressionWithName(node, "then") ||
144843 ts.hasPropertyAccessExpressionWithName(node, "catch") ||
144844 ts.hasPropertyAccessExpressionWithName(node, "finally"));
144845 }
144846 function hasSupportedNumberOfArguments(node) {
144847 var name = node.expression.name.text;
144848 var maxArguments = name === "then" ? 2 : name === "catch" ? 1 : name === "finally" ? 1 : 0;

Callers 1

isFixablePromiseHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected