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

Function isThisless

test/fixtures/snapshot/typescript.js:57612–57630  ·  view source on GitHub ↗

* Returns true if the class or interface member given by the symbol is free of "this" references. The * function may return false for symbols that are actually free of "this" references because it is not * feasible to perform a complete analysis in all cases. In particular, propert

(symbol)

Source from the content-addressed store, hash-verified

57610 * assumed not to be free of "this" references.
57611 */
57612 function isThisless(symbol) {
57613 if (symbol.declarations && symbol.declarations.length === 1) {
57614 var declaration = symbol.declarations[0];
57615 if (declaration) {
57616 switch (declaration.kind) {
57617 case 167 /* SyntaxKind.PropertyDeclaration */:
57618 case 166 /* SyntaxKind.PropertySignature */:
57619 return isThislessVariableLikeDeclaration(declaration);
57620 case 169 /* SyntaxKind.MethodDeclaration */:
57621 case 168 /* SyntaxKind.MethodSignature */:
57622 case 171 /* SyntaxKind.Constructor */:
57623 case 172 /* SyntaxKind.GetAccessor */:
57624 case 173 /* SyntaxKind.SetAccessor */:
57625 return isThislessFunctionLikeDeclaration(declaration);
57626 }
57627 }
57628 }
57629 return false;
57630 }
57631 // The mappingThisOnly flag indicates that the only type parameter being mapped is "this". When the flag is true,
57632 // we check symbols to see if we can quickly conclude they are free of "this" references, thus needing no instantiation.
57633 function createInstantiatedSymbolTable(symbols, mapper, mappingThisOnly) {

Callers 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…