(
jsxElement: JSXElement,
attributeStatements: JSXAttributeStatements,
output: JSXOutputState,
transformContext: ts.TransformationContext,
)
| 516 | } |
| 517 | |
| 518 | private outputElementInner( |
| 519 | jsxElement: JSXElement, |
| 520 | attributeStatements: JSXAttributeStatements, |
| 521 | output: JSXOutputState, |
| 522 | transformContext: ts.TransformationContext, |
| 523 | ): ts.Statement[] { |
| 524 | const statements: ts.Statement[] = []; |
| 525 | |
| 526 | if (attributeStatements.nodeRef) { |
| 527 | const transformedValueNode = this.transformNode(attributeStatements.nodeRef, output, transformContext); |
| 528 | const transformedValue = this.toExpression(transformedValueNode, transformContext); |
| 529 | |
| 530 | statements.push( |
| 531 | this.createRendererCall('setAttributeRef', [transformedValue], attributeStatements.nodeRef, transformContext), |
| 532 | ); |
| 533 | } |
| 534 | |
| 535 | for (const attribute of attributeStatements.dynamicAttributes) { |
| 536 | if (attribute.value.kind === JSXAttributeValueKind.spread) { |
| 537 | statements.push( |
| 538 | this.createRendererCall('setAttributes', [attribute.value.value], attribute.node, transformContext), |
| 539 | ); |
| 540 | } else { |
| 541 | const transformedValueNode = this.transformNode(attribute.value.value, output, transformContext); |
| 542 | const transformedValue = this.toExpression(transformedValueNode, transformContext); |
| 543 | const setAttributeCall = this.resolveSetAttributeCall(attribute.value.value, output); |
| 544 | statements.push( |
| 545 | this.createRendererCall( |
| 546 | setAttributeCall, |
| 547 | [createStringLiteral(attribute.name!, transformContext), transformedValue], |
| 548 | attribute.node, |
| 549 | transformContext, |
| 550 | ), |
| 551 | ); |
| 552 | } |
| 553 | } |
| 554 | |
| 555 | statements.push(...this.outputJSXChildren(jsxElement.element, jsxElement.children, output, transformContext)); |
| 556 | |
| 557 | statements.push(this.createRendererCall('endRender', [], undefined, transformContext)); |
| 558 | return statements; |
| 559 | } |
| 560 | |
| 561 | private outputComponentViewModelProperties( |
| 562 | attributeStatements: JSXAttributeStatements, |
no test coverage detected