TypeScript Version: 2.9.1/3.0.0-dev.20180602
Search Terms:
- trailing comma
- binding pattern
- A rest parameter or binding pattern may not have a trailing comma.
Code
declare const anything: any[];
let a;
[
a,
] = anything;
let [
b,
] = anything;
Expected behavior:
no error
Actual behavior:
test.ts:6:4 - error TS1013: A rest parameter or binding pattern may not have a trailing comma.
6 a,
~
Per ECMAScript Spec, the trailing comma is allowed in a binding pattern without rest element.

Playground Link:
link
Related Issues:
(from prettier/prettier#4624)
TypeScript Version: 2.9.1/3.0.0-dev.20180602
Search Terms:
Code
Expected behavior:
no error
Actual behavior:
Per ECMAScript Spec, the trailing comma is allowed in a binding pattern without rest element.
Playground Link:
link
Related Issues:
(from prettier/prettier#4624)