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.
Missing rest operator in object destructuring #295
Closed
Description
What version of TypeScript are you using?
2.3.2
What version of typescript-eslint-parser
are you using?
What code were you trying to parse?
const { children, ...props } = this.props
What did you expect to happen?
...
operator should be in the AST.
What happened?
require('.').parse("const { children, ...props } = this.props").body[0].declarations[0].id.properties[1]
{ type: 'Property',
range: [ 18, 26 ],
loc: { start: { line: 1, column: 18 }, end: { line: 1, column: 26 } },
key:
{ type: 'Identifier',
range: [ 21, 26 ],
loc: { start: [Object], end: [Object] },
name: 'props' },
value:
{ type: 'Identifier',
range: [ 21, 26 ],
loc: { start: [Object], end: [Object] },
name: 'props' },
computed: false,
method: false,
shorthand: true,
kind: 'init' }