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

Function getJsxReferenceKind

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

Source from the content-addressed store, hash-verified

75607 return typeArgumentTypes;
75608 }
75609 function getJsxReferenceKind(node) {
75610 if (isJsxIntrinsicIdentifier(node.tagName)) {
75611 return 2 /* JsxReferenceKind.Mixed */;
75612 }
75613 var tagType = getApparentType(checkExpression(node.tagName));
75614 if (ts.length(getSignaturesOfType(tagType, 1 /* SignatureKind.Construct */))) {
75615 return 0 /* JsxReferenceKind.Component */;
75616 }
75617 if (ts.length(getSignaturesOfType(tagType, 0 /* SignatureKind.Call */))) {
75618 return 1 /* JsxReferenceKind.Function */;
75619 }
75620 return 2 /* JsxReferenceKind.Mixed */;
75621 }
75622 /**
75623 * Check if the given signature can possibly be a signature called by the JSX opening-like element.
75624 * @param node a JSX opening-like element we are trying to figure its call signature

Calls 5

isJsxIntrinsicIdentifierFunction · 0.85
getApparentTypeFunction · 0.85
getSignaturesOfTypeFunction · 0.85
checkExpressionFunction · 0.70
lengthMethod · 0.45

Tested by

no test coverage detected