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

Method processJSXElement

compiler/companion/src/JSXProcessor.ts:1151–1174  ·  view source on GitHub ↗
(
    node: ts.JsxElement,
    output: JSXOutputState,
    transformContext: ts.TransformationContext,
  )

Source from the content-addressed store, hash-verified

1149 }
1150
1151 private processJSXElement(
1152 node: ts.JsxElement,
1153 output: JSXOutputState,
1154 transformContext: ts.TransformationContext,
1155 ): ts.Statement[] {
1156 const attributes = this.extractJSXAttributes(node.openingElement.attributes, output, transformContext);
1157
1158 const children: ts.JsxChild[] = [];
1159 for (const child of node.children) {
1160 children.push(child);
1161 }
1162
1163 return this.outputJSX(
1164 {
1165 element: node.openingElement,
1166 closingElement: node.closingElement,
1167 nodeType: node.openingElement.tagName,
1168 attributes,
1169 children,
1170 },
1171 output,
1172 transformContext,
1173 );
1174 }
1175
1176 private processSelfClosingJSXElement(
1177 node: ts.JsxSelfClosingElement,

Callers 1

transformNodeMethod · 0.95

Calls 3

extractJSXAttributesMethod · 0.95
outputJSXMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected