This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
Wrong type for JSXSpreadChild #500
Closed
Description
What version of TypeScript are you using?
3.0.0-dev.20180626
What version of typescript-eslint-parser
are you using?
master (6eec85b)
What code were you trying to parse?
const x = <div>{...[0]}</div>
What did you expect to happen?
{
"type": "ExpressionStatement",
"expression": {
"type": "JSXElement",
"openingElement": {
"type": "JSXOpeningElement",
"attributes": [],
"name": {
"type": "JSXIdentifier",
"name": "div"
},
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"name": {
"type": "JSXIdentifier",
"name": "div"
}
},
"children": [
{
"type": "JSXSpreadChild",
"expression": {
"type": "ArrayExpression",
"elements": [
{
"type": "Literal",
"value": 0
}
]
}
}
]
}
}
What happened?
- "type": "JSXSpreadChild",
+ "type": "JSXExpressionContainer",