(
node: ts.Node,
output: JSXOutputState,
transformContext: ts.TransformationContext,
)
| 1480 | } |
| 1481 | |
| 1482 | private extractJSXAttributes( |
| 1483 | node: ts.Node, |
| 1484 | output: JSXOutputState, |
| 1485 | transformContext: ts.TransformationContext, |
| 1486 | ): JSXAttribute[] { |
| 1487 | const jsxAttributes: JSXAttribute[] = []; |
| 1488 | ts.forEachChild(node, (attribute) => { |
| 1489 | switch (attribute.kind) { |
| 1490 | case ts.SyntaxKind.JsxAttribute: |
| 1491 | { |
| 1492 | let jsxAttribute = this.extractJSXAttribute(attribute, output, transformContext); |
| 1493 | jsxAttributes.push(jsxAttribute); |
| 1494 | } |
| 1495 | break; |
| 1496 | case ts.SyntaxKind.JsxSpreadAttribute: |
| 1497 | { |
| 1498 | let jsxAttribute = this.extractJSXSpreadAttribute(attribute); |
| 1499 | jsxAttributes.push({ |
| 1500 | node: attribute, |
| 1501 | name: undefined, |
| 1502 | value: jsxAttribute, |
| 1503 | }); |
| 1504 | } |
| 1505 | break; |
| 1506 | default: |
| 1507 | this.onUnexpectedNodeKind(node); |
| 1508 | } |
| 1509 | }); |
| 1510 | |
| 1511 | return jsxAttributes; |
| 1512 | } |
| 1513 | |
| 1514 | static createFromFile(fileName: string, fileContent: string, includeSourceMapping: boolean): JSXFileProcessor { |
| 1515 | return new JSXFileProcessor(fileName, fileContent, includeSourceMapping); |
no test coverage detected