This seems like a known issue, since the {...foo}destructuring is compiled into Object.assign({}, foo)and Object.assign()declared as
assign<T, U>(target: T, source: U): T & U;
therefore, when the second argument is an array, the result is compatible with the type of the array.
, , Object.assign:
, PR , , , Object.assign :
assign (target: T, source: U): {... T,... U}
, , length, ,
const p: Array<number> = {};
// Type '{}' is not assignable to type 'number[]'.
// Property 'length' is missing in type '{}'.