mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Allow any type for spreads in JsxExpression
This commit is contained in:
1 parent
d29c78e718
commit
7eb39cc80c
4 files changed
+24
-1
No files matched your search
@@ -10905,7 +10905,7 @@ namespace ts {
|
||||
function checkJsxExpression(node: JsxExpression) {
|
||||
if (node.expression) {
|
||||
const type = checkExpression(node.expression);
|
||||
if (node.dotDotDotToken && !isArrayType(type)) {
|
||||
if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) {
|
||||
error(node, Diagnostics.JSX_spread_child_must_be_an_array_type, node.toString(), typeToString(type));
|
||||
}
|
||||
return type;
|
||||
|
||||
Reference in new issue
Block a user