摘要: 题目 中文 你知道 lodash 吗? lodash中有一个非常实用的方法Chunk, 让a56爆大奖在线娱乐们实现它吧. Chunk<T, N>接受两个泛型参数, 其中 T 是 tuple 类型, N是大于 1 的数字 type exp1 = Chunk<[1, 2, 3], 2>; // expected to 阅读全文
posted @ 2022-10-23 22:43 Laggage 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 题目 中文 实现 IsTuple 类型, 接受一个泛型参数 T 作为输入, 并返回 T 是否为 tuple 类型 示例: type case1 = IsTuple<[number]>; // true type case2 = IsTuple<readonly [number]>; // true 阅读全文
posted @ 2022-10-23 21:58 Laggage 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 题目 中文 在本挑战中, 你需要实现 GreaterThan<T, U>, 它的作用像 T > U 你不需要考虑负数 示例: GreaterThan < 2, 1 > //should be true GreaterThan < 1, 1 > //should be false GreaterTha 阅读全文
posted @ 2022-10-23 20:58 Laggage 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 题目 中文 实现类型 AllCombinations<S>,该类型返回字符串 S 中字符的所有排列组合。 English Implement type AllCombinations<S> that return all combinations of strings which use chara 阅读全文
posted @ 2022-10-23 20:21 Laggage 阅读(30) 评论(0) 推荐(0) 编辑