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

Function hasContextSensitiveParameters

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

Source from the content-addressed store, hash-verified

21355 }
21356 ts.getContainingNodeArray = getContainingNodeArray;
21357 function hasContextSensitiveParameters(node) {
21358 // Functions with type parameters are not context sensitive.
21359 if (!node.typeParameters) {
21360 // Functions with any parameters that lack type annotations are context sensitive.
21361 if (ts.some(node.parameters, function (p) { return !getEffectiveTypeAnnotationNode(p); })) {
21362 return true;
21363 }
21364 if (node.kind !== 214 /* SyntaxKind.ArrowFunction */) {
21365 // If the first parameter is not an explicit 'this' parameter, then the function has
21366 // an implicit 'this' parameter which is subject to contextual typing.
21367 var parameter = ts.firstOrUndefined(node.parameters);
21368 if (!(parameter && parameterIsThisKeyword(parameter))) {
21369 return true;
21370 }
21371 }
21372 }
21373 return false;
21374 }
21375 ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
21376 /* @internal */
21377 function isInfinityOrNaNString(name) {

Callers

nothing calls this directly

Calls 3

parameterIsThisKeywordFunction · 0.85
someMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…