Typescript lets you spread an array into an object

I ran into an instance of this&#xA0; Typescript bug &#xA0;recently. Basically, Typescript lets you do this without compiler errors: const arr = [1, 2, 3]; const x: { a: number[] } = { a: { ...arr } }; x.a.map(n => n + 1); Note the { ...arr } instead of [...arr] ! Running this throws the error