It turns out it’s possible to specify the type after : for the whole destructuring pattern:
const {foo}: {foo: IFoo[]} = bar;
Which in reality is not any better than plain old
const foo: IFoo[] = bar.foo;
It turns out it’s possible to specify the type after : for the whole destructuring pattern:
const {foo}: {foo: IFoo[]} = bar;
Which in reality is not any better than plain old
const foo: IFoo[] = bar.foo;