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

Function isThislessVariableLikeDeclaration

test/fixtures/snapshot/typescript.js:57589–57592  ·  view source on GitHub ↗

* A variable-like declaration is free of this references if it has a type annotation * that is thisless, or if it has no type annotation and no initializer (and is thus of type any).

(node)

Source from the content-addressed store, hash-verified

57587 * that is thisless, or if it has no type annotation and no initializer (and is thus of type any).
57588 */
57589 function isThislessVariableLikeDeclaration(node) {
57590 var typeNode = ts.getEffectiveTypeAnnotationNode(node);
57591 return typeNode ? isThislessType(typeNode) : !ts.hasInitializer(node);
57592 }
57593 /**
57594 * A function-like declaration is considered free of `this` references if it has a return type
57595 * annotation that is free of this references and if each parameter is thisless and if

Callers 1

isThislessFunction · 0.85

Calls 1

isThislessTypeFunction · 0.85

Tested by

no test coverage detected