Here's an interesting scenario:
const { foo: IFoo[] } = bar;
This situation, along with the following:
const { foo: Array<IFoo> } = bar;
could potentially lead to errors.
However, if you have something like this:
const { foo: TFoo } = bar;
it will simply destructure the TFoo
property.
So, the question remains: How should types be specified for object properties that are being destructured?