mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 15:45:27 -05:00
Transform JSX spread children (#45693)
* Transform JSX spread children * Target es2015 to skip helper and refine emit Co-authored-by: Ron Buckton <ron.buckton@microsoft.com> Co-authored-by: Ron Buckton <ron.buckton@microsoft.com> Co-authored-by: Orta <git@orta.io>
This commit is contained in:
@@ -547,7 +547,8 @@ namespace ts {
|
||||
}
|
||||
|
||||
function visitJsxExpression(node: JsxExpression) {
|
||||
return visitNode(node.expression, visitor, isExpression);
|
||||
const expression = visitNode(node.expression, visitor, isExpression);
|
||||
return node.dotDotDotToken ? factory.createSpreadElement(expression!) : expression;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user