(
node: ts.JsxElement | ts.JsxSelfClosingElement,
sourceFile: ts.SourceFile
)
| 204 | } |
| 205 | |
| 206 | private extractFieldMetadata( |
| 207 | node: ts.JsxElement | ts.JsxSelfClosingElement, |
| 208 | sourceFile: ts.SourceFile |
| 209 | ): Partial<ExtractedField> { |
| 210 | // For JsxElement, traverse children to find render prop |
| 211 | if (ts.isJsxElement(node)) { |
| 212 | for (const child of node.children) { |
| 213 | if (ts.isJsxExpression(child) && child.expression) { |
| 214 | // Look for arrow function: {field => <field.Input ... />} |
| 215 | if (ts.isArrowFunction(child.expression)) { |
| 216 | return this.extractFromRenderProp(child.expression, sourceFile); |
| 217 | } |
| 218 | } |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | return {}; |
| 223 | } |
| 224 | |
| 225 | private extractFromRenderProp( |
| 226 | arrowFn: ts.ArrowFunction, |
no test coverage detected