* 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)
| 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 |
no test coverage detected