MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getSingleJsxExpression

Method getSingleJsxExpression

compiler/companion/src/JSXProcessor.ts:428–439  ·  view source on GitHub ↗
(children: ts.JsxChild[])

Source from the content-addressed store, hash-verified

426 }
427
428 private getSingleJsxExpression(children: ts.JsxChild[]): ts.Expression | undefined {
429 if (children.length !== 1) {
430 return undefined;
431 }
432
433 const uniqueChild = children[0];
434 if (!ts.isJsxExpression(uniqueChild)) {
435 return undefined;
436 }
437
438 return uniqueChild.expression;
439 }
440
441 private outputSlot(
442 node: ts.Node,

Callers 1

outputSlotMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected