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.
[Error] Parsing error on typed destructured object parameters #148
Closed
Description
What version of TypeScript are you using?
2.0.3
What version of typescript-eslint-parser
are you using?
1.0.2
What code were you trying to parse?
foo({ bar, baz }: { bar: string, baz }) {
//
}
What did you expect to happen?
Correct parsing
What happened?
0:0 error Parsing error: Cannot read property 'loc' of null
Parsing fails when at least one parameter does not have a type assigned.
Note: 'baz' is required even if I don't want to type it
This does not work in TypeScript :
foo({ bar, baz }: { bar: string }) {
//
}