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

Function getExplicitThisType

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

Source from the content-addressed store, hash-verified

72042 }
72043 }
72044 function getExplicitThisType(node) {
72045 var container = ts.getThisContainer(node, /*includeArrowFunctions*/ false);
72046 if (ts.isFunctionLike(container)) {
72047 var signature = getSignatureFromDeclaration(container);
72048 if (signature.thisParameter) {
72049 return getExplicitTypeOfSymbol(signature.thisParameter);
72050 }
72051 }
72052 if (ts.isClassLike(container.parent)) {
72053 var symbol = getSymbolOfNode(container.parent);
72054 return ts.isStatic(container) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType;
72055 }
72056 }
72057 function getClassNameFromPrototypeMethod(container) {
72058 // Check if it's the RHS of a x.prototype.y = function [name]() { .... }
72059 if (container.kind === 213 /* SyntaxKind.FunctionExpression */ &&

Callers 1

getTypeOfDottedNameFunction · 0.85

Calls 5

getExplicitTypeOfSymbolFunction · 0.85
getSymbolOfNodeFunction · 0.85
getTypeOfSymbolFunction · 0.85
getDeclaredTypeOfSymbolFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…