Ts体操--unshift
zhuba-Ahhh opened this issue · comments
实现类型版本的 Array.unshift
type Unshift<T extends unknown[], U> = [U, ...T];
type Result = Unshift<[1, 2], 0> // [0, 1, 2];
✨✨✨ Challenge your JavaScript programming limits step by step
zhuba-Ahhh opened this issue · comments
实现类型版本的 Array.unshift
type Unshift<T extends unknown[], U> = [U, ...T];
type Result = Unshift<[1, 2], 0> // [0, 1, 2];