摘要:
In This Challenge, You should implement a type GreaterThan<T, U> like T > U Negative numbers do not need to be considered. For example GreaterThan<2, 阅读全文
摘要:
You can do some really, really neat stuff with assertion functions inside classes. Here, we assert that the user is logged in and get proper inference 阅读全文
摘要:
Implement a generic Fibonacci<T> that takes a number T and returns its corresponding Fibonacci number. The sequence starts: 1, 1, 2, 3, 5, 8, 13, 21, 阅读全文
摘要:
From T, pick a set of properties whose type are not assignable to U. For Example type OmitBoolean = OmitByType<{ name: string count: number isReadonly 阅读全文
摘要:
Implement the type version of binary tree inorder traversal. For example: const tree1 = { val: 1, left: null, right: { val: 2, left: { val: 3, left: n 阅读全文