MCPcopy Index your code
hub / github.com/nodejs/node / isThislessFunctionLikeDeclaration

Function isThislessFunctionLikeDeclaration

test/fixtures/snapshot/typescript.js:57598–57604  ·  view source on GitHub ↗

* A function-like declaration is considered free of `this` references if it has a return type * annotation that is free of this references and if each parameter is thisless and if * each type parameter (if present) is thisless.

(node)

Source from the content-addressed store, hash-verified

57596 * each type parameter (if present) is thisless.
57597 */
57598 function isThislessFunctionLikeDeclaration(node) {
57599 var returnType = ts.getEffectiveReturnTypeNode(node);
57600 var typeParameters = ts.getEffectiveTypeParameterDeclarations(node);
57601 return (node.kind === 171 /* SyntaxKind.Constructor */ || (!!returnType && isThislessType(returnType))) &&
57602 node.parameters.every(isThislessVariableLikeDeclaration) &&
57603 typeParameters.every(isThislessTypeParameter);
57604 }
57605 /**
57606 * Returns true if the class or interface member given by the symbol is free of "this" references. The
57607 * function may return false for symbols that are actually free of "this" references because it is not

Callers 1

isThislessFunction · 0.85

Calls 2

isThislessTypeFunction · 0.85
everyMethod · 0.80

Tested by

no test coverage detected