MCPcopy Create free account
hub / github.com/nodejs/node / isInJSXText

Function isInJSXText

test/fixtures/snapshot/typescript.js:127698–127710  ·  view source on GitHub ↗
(sourceFile, position)

Source from the content-addressed store, hash-verified

127696 }
127697 ts.isInTemplateString = isInTemplateString;
127698 function isInJSXText(sourceFile, position) {
127699 var token = getTokenAtPosition(sourceFile, position);
127700 if (ts.isJsxText(token)) {
127701 return true;
127702 }
127703 if (token.kind === 18 /* SyntaxKind.OpenBraceToken */ && ts.isJsxExpression(token.parent) && ts.isJsxElement(token.parent.parent)) {
127704 return true;
127705 }
127706 if (token.kind === 29 /* SyntaxKind.LessThanToken */ && ts.isJsxOpeningLikeElement(token.parent) && ts.isJsxElement(token.parent.parent)) {
127707 return true;
127708 }
127709 return false;
127710 }
127711 ts.isInJSXText = isInJSXText;
127712 function isInsideJsxElement(sourceFile, position) {
127713 function isInsideJsxElementTraversal(node) {

Callers

nothing calls this directly

Calls 1

getTokenAtPositionFunction · 0.85

Tested by

no test coverage detected