上一页 1 ··· 93 94 95 96 97 98 99 100 101 ··· 494 下一页
摘要: Implement the type version of Lodash.uniq, Unique takes an Array T, returns the Array T without repeated values. type Res = Unique<[1, 1, 2, 2, 3, 3]> 阅读全文
posted @ 2022-10-29 16:10 Zhentiw 阅读(28) 评论(0) 推荐(0)
摘要: Implement the built-in Parameters generic without using it. For example: const foo = (arg1: string, arg2: number): void => {} type FunctionParamsType 阅读全文
posted @ 2022-10-29 03:16 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: Implement the type version of Array.unshift For example: type Result = Unshift<[1, 2], 0> // [0, 1, 2,] /* _____________ Your Code Here _____________ 阅读全文
posted @ 2022-10-29 03:12 Zhentiw 阅读(28) 评论(0) 推荐(0)
摘要: Implement the generic version of Array.push For example: type Result = Push<[1, 2], '3'> // [1, 2, '3'] /* _____________ Your Code Here _____________ 阅读全文
posted @ 2022-10-29 03:09 Zhentiw 阅读(24) 评论(0) 推荐(0)
摘要: Implement the type version of Array.lastIndexOf, LastIndexOf<T, U> takes an Array T, any U and returns the index of the last U in Array T For example: 阅读全文
posted @ 2022-10-28 15:43 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: Implement the type version of Array.join, Join<T, U> takes an Array T, string or number U and returns the Array T with U stitching up. type Res = Join 阅读全文
posted @ 2022-10-28 15:07 Zhentiw 阅读(21) 评论(0) 推荐(0)
摘要: Implement the type version of Array.indexOf, indexOf<T, U> takes an Array T, any U and returns the index of the first U in Array T. type Res = IndexOf 阅读全文
posted @ 2022-10-27 14:39 Zhentiw 阅读(28) 评论(0) 推荐(0)
摘要: Implement the type version of Math.trunc, which takes string or number and returns the integer part of a number by removing any fractional digits. For 阅读全文
posted @ 2022-10-27 14:29 Zhentiw 阅读(28) 评论(0) 推荐(0)
摘要: Let's say we have a simple app look like this: import { useEffect, useState } from "react"; function useFetch(config) { console.log("useFetch call"); 阅读全文
posted @ 2022-10-26 21:52 Zhentiw 阅读(42) 评论(0) 推荐(0)
摘要: Implement the type version of Lodash.without, Without<T, U> takes an Array T, number or array U and returns an Array without the elements of U. type R 阅读全文
posted @ 2022-10-26 20:53 Zhentiw 阅读(21) 评论(0) 推荐(0)
上一页 1 ··· 93 94 95 96 97 98 99 100 101 ··· 494 下一页