mattpocock / ts-error-translator

VSCode extension to turn TypeScript errors into plain English
https://ts-error-translator.vercel.app
2.36k stars 91 forks source link

Translation request for 2488 #201

Closed DanieleBaelde-RAD closed 1 year ago

DanieleBaelde-RAD commented 1 year ago

Error Text

Type 'AssertsShape<{ dashboard: RequiredStringSchema<string | undefined, AnyObject>; link: RequiredStringSchema<string | undefined, AnyObject>; }>[] | undefined' must have a '[Symbol.iterator]()' method that returns an iterator.

Supporting Information

Please provide other information which led to this error, and any specific questions you have about it: I have a React component that exists only when this data is available and it's always an array, but could be undefined before as is DB fetched data. Now I'm trying to spread the array into a new array to add another item like this: [...prop, newData]