上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 491 下一页
摘要: Implement the util type OptionalUndefined<T, Props> that turns all the properties of T that can be undefined, into optional properties. In addition, a 阅读全文
posted @ 2023-07-18 19:58 Zhentiw 阅读(11) 评论(0) 推荐(0)
摘要: Given a number N, find the Nth triangular number, i.e. 1 + 2 + 3 + ... + N /* _____________ Your Code Here _____________ */ export type NumberToArray< 阅读全文
posted @ 2023-07-18 19:47 Zhentiw 阅读(14) 评论(0) 推荐(0)
摘要: Given 2 sets (unions), return its Cartesian product in a set of tuples, e.g. CartesianProduct<1 | 2, 'a' | 'b'> // [1, 'a'] | [2, 'a'] | [1, 'b'] | [2 阅读全文
posted @ 2023-07-18 19:22 Zhentiw 阅读(18) 评论(0) 推荐(0)
摘要: Solution 1: consider change font-size to 16px or above Soution 2: using javascript if(navigator.userAgent.indexOf('iPhone') > -1 ) { document .querySe 阅读全文
posted @ 2023-07-17 17:16 Zhentiw 阅读(13) 评论(0) 推荐(0)
摘要: Merge variadic number of types into a new type. If the keys overlap, its values should be merged into an union. For example: type Foo = { a: 1; b: 2 } 阅读全文
posted @ 2023-07-17 02:37 Zhentiw 阅读(10) 评论(0) 推荐(0)
摘要: Implement type CheckRepeatedChars<T> which will return whether type T contains duplicated member For example: type CheckRepeatedTuple<[1, 2, 3]> // fa 阅读全文
posted @ 2023-07-17 01:55 Zhentiw 阅读(10) 评论(0) 推荐(0)
摘要: Remove the key starting with _ from given type T. /* _____________ Your Code Here _____________ */ type PublicType<T extends object> = { [Key in keyof 阅读全文
posted @ 2023-07-17 01:43 Zhentiw 阅读(5) 评论(0) 推荐(0)
摘要: Empty commits might seem unusual, but they offer significant advantages in managing version control. By documenting milestones, triggering automation 阅读全文
posted @ 2023-07-16 01:32 Zhentiw 阅读(41) 评论(0) 推荐(0)
摘要: You're given two identical crystal balls and a 100-story building. The balls are incredibly tough, but there exists some floor in the building, above 阅读全文
posted @ 2023-07-08 20:23 Zhentiw 阅读(73) 评论(0) 推荐(0)
摘要: type OverloadedReturnType<T> = T extends { (...args: any[]) : infer R; (...args: any[]) : infer R; (...args: any[]) : infer R ; (...args: any[]) : inf 阅读全文
posted @ 2023-07-06 14:17 Zhentiw 阅读(12) 评论(0) 推荐(0)
上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 491 下一页