Skip to content
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.

Destructuring assignment missing from converted AST #332

Closed
@azz

Description

@azz

What version of TypeScript are you using?

2.4.0

What version of typescript-eslint-parser are you using?

ts-2.4 branch

What code were you trying to parse?

({ foo = [] } = bar);

What did you expect to happen?

The equalsToken and objectAssignmentInitializer from the ShorthandPropertyAssignment node should be converted to an AssignmentPattern on the value property of the converted Property.

https://astexplorer.net/#/gist/c5a213f580c9d6c3dade3c0c2203fe99/5f93de582529b7b3a8bcdb36919b8f560366f01e

What happened?

Both the key and the value in the converted Property are foo Identifiers.

https://github.com/estree/estree/blob/master/es2015.md#objectpattern

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions