# Bug Report <!-- Please fill in each section completely. Thank you! --> ### 🔎 Search Terms <!-- What search terms did you use when trying to find an existing bug report? List them here so people in the future can find this one more easily. --> destructure, spread, object, array ### 🕗 Version & Regression Information Using 4.5.5 but also in nightly playground <!-- When did you start seeing this bug occur? "Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs If possible, please try testing the nightly version of TS to see if it's already been fixed. For npm: `typescript@next` This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly Note: The TypeScript Playground can be used to try older versions of TypeScript. Please keep and fill in the line that best applies: --> - This is the behavior in every version I tried, and I reviewed the FAQ for entries about spread operator ### ⏯ Playground Link [Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.8.0-dev.20220624#code/C4TwDgpgBAsiAq5oF4oG9gQM7AFxRwCcBLAOwHMBfAWACg6BjAe1JygBtid85FIBtALpRU-DNjxQARAEMplADTpM3aQCN5ggNx1GLNgA98AJQjNCAEwA8RMuSW8kQgHwj0dKNIAWEduyZS+GgenlAAdBGcOCE0tLF6rEzsEGH+5AAUBgCUOrQG-FI+fgGCYQC2MmDp6b5ZIq61WkA) ### 💻 Code <!-- Please post the relevant code sample here as well--> ```ts type MyType = {test: string} const list: MyType[] = [{test: "a"}, {test: "b"}]; const x: Record<string, MyType[]> = { // object shouldn't be allowed? "hello": { ...list } } console.log(x); x["hello"].map((el) => el); // map doesn't exist on object ``` ### 🙁 Actual behavior Spreading an array inside an object where an array is expected works, and the type information is then incorrect. ### 🙂 Expected behavior Spreading an array inside an object where an array is expected should give a type error.