Sunny-117/js-challenges

concat

FailurMan opened this issue · 1 comments

//ts实现数组的concat功能
type Concat<T extends any[], U extends any[]> = [...T, ...U];
type Result = Concat<[1], [2]>;

个人觉得将any换成unknown会更严谨一些