(child, nameType, getInvalidTextDiagnostic)
| 64127 | }); |
| 64128 | } |
| 64129 | function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { |
| 64130 | switch (child.kind) { |
| 64131 | case 288 /* SyntaxKind.JsxExpression */: |
| 64132 | // child is of the type of the expression |
| 64133 | return { errorNode: child, innerExpression: child.expression, nameType: nameType }; |
| 64134 | case 11 /* SyntaxKind.JsxText */: |
| 64135 | if (child.containsOnlyTriviaWhiteSpaces) { |
| 64136 | break; // Whitespace only jsx text isn't real jsx text |
| 64137 | } |
| 64138 | // child is a string |
| 64139 | return { errorNode: child, innerExpression: undefined, nameType: nameType, errorMessage: getInvalidTextDiagnostic() }; |
| 64140 | case 278 /* SyntaxKind.JsxElement */: |
| 64141 | case 279 /* SyntaxKind.JsxSelfClosingElement */: |
| 64142 | case 282 /* SyntaxKind.JsxFragment */: |
| 64143 | // child is of type JSX.Element |
| 64144 | return { errorNode: child, innerExpression: child, nameType: nameType }; |
| 64145 | default: |
| 64146 | return ts.Debug.assertNever(child, "Found invalid jsx child"); |
| 64147 | } |
| 64148 | } |
| 64149 | function elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer) { |
| 64150 | var result = elaborateElementwise(generateJsxAttributes(node), source, target, relation, containingMessageChain, errorOutputContainer); |
| 64151 | var invalidTextDiagnostic; |
no outgoing calls
no test coverage detected
searching dependent graphs…