摘要:
Implement the type version of Array.unshift For example: type Result = Unshift<[1, 2], 0> // [0, 1, 2,] /* _____________ Your Code Here _____________ 阅读全文
摘要:
Implement the generic version of Array.push For example: type Result = Push<[1, 2], '3'> // [1, 2, '3'] /* _____________ Your Code Here _____________ 阅读全文
摘要:
Implement the Equal<T, U> For example: type isEqual = Equal<1, 1> // true Idea: Parameter type: <P>(x: P) => any Check P extends T ? 1: 2 Then check P 阅读全文