Variadic Tuple Missing a Spread
Variadic tuple types must spread every tuple you want flattened into the result.
Codetypescript
function concat<T extends unknown[], U extends unknown[]>(
a: T,
b: U
): [...T, U] {
return [...a, ...b];
}
const result = concat([1, 2], ["a", "b"]);
// expected type: [number, number, string, string]What is the bug in this code?