error TS2769: No overload matches this call.
Bad Code ❌
Fixed Code ✔️
When proving just an empty array (
), then TypeScript does not know what type of elements can be stored in this array. That’s why there is no overload which matches when adding values from a typed array (such as
bestConfigs) to an untyped array. The solution here is to provide a typed array of the same type as the array that is being used for concatenation.