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

Function getContextNode

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

Source from the content-addressed store, hash-verified

79475 type.flags & 58982400 /* TypeFlags.InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* TypeFlags.StringLike */));
79476 }
79477 function getContextNode(node) {
79478 if (node.kind === 286 /* SyntaxKind.JsxAttributes */ && !ts.isJsxSelfClosingElement(node.parent)) {
79479 return node.parent.parent; // Needs to be the root JsxElement, so it encompasses the attributes _and_ the children (which are essentially part of the attributes)
79480 }
79481 return node;
79482 }
79483 function checkExpressionWithContextualType(node, contextualType, inferenceContext, checkMode) {
79484 var context = getContextNode(node);
79485 var saveContextualType = context.contextualType;

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…