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

Function tryGetThisParameterDeclaration

test/fixtures/snapshot/typescript.js:53323–53337  ·  view source on GitHub ↗
(signature, context)

Source from the content-addressed store, hash-verified

53321 return node;
53322 }
53323 function tryGetThisParameterDeclaration(signature, context) {
53324 if (signature.thisParameter) {
53325 return symbolToParameterDeclaration(signature.thisParameter, context);
53326 }
53327 if (signature.declaration) {
53328 var thisTag = ts.getJSDocThisTag(signature.declaration);
53329 if (thisTag && thisTag.typeExpression) {
53330 return ts.factory.createParameterDeclaration(
53331 /* decorators */ undefined,
53332 /* modifiers */ undefined,
53333 /* dotDotDotToken */ undefined, "this",
53334 /* questionToken */ undefined, typeToTypeNodeHelper(getTypeFromTypeNode(thisTag.typeExpression), context));
53335 }
53336 }
53337 }
53338 function typeParameterToDeclarationWithConstraint(type, context, constraintNode) {
53339 var savedContextFlags = context.flags;
53340 context.flags &= ~512 /* NodeBuilderFlags.WriteTypeParametersInQualifiedName */; // Avoids potential infinite loop when building for a claimspace with a generic

Callers 1

Calls 3

typeToTypeNodeHelperFunction · 0.85
getTypeFromTypeNodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…