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.

ObjectPattern instead of ObjectExpression inside BinaryExpression #331

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?

(a => ({})) + 1;

What did you expect to happen?

The {} should be an ObjectExpression.

What happened?

The {} is an ObjectPattern.

This is only an issue inside BinaryExpressions, and interestingly is not a problem with 1 + (a => ({}));.

See repro here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions