'Why do array type become tuples?
I have a problem with typescript
function watches<T extends unknown[]>(
sources: [...T],
cb: (value: T) => any,
){
}
watches([{a:1},'1'],(b)=>{}) // b -> [{a: number}, string]
this is exactly what i want, but why?
why (value: T) => any value is a tuple?
i feel it incredible.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
