摘要:
Fill, a common JavaScript function, now let us implement it with types. Fill<T, N, Start?, End?>, as you can see,Fill accepts four types of parameters 阅读全文
摘要:
https://www.typescriptlang.org/docs/handbook/modules.html#ambient-modules Example for declare node.js "url" & "path" module: node.d.ts declare module 阅读全文
摘要:
https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require When you export using `export = ` let numberRegexp = /^[0-9]+$/; 阅读全文
摘要:
Do you know lodash? Chunk is a very useful function in it, now let's implement it. Chunk<T, N> accepts two required type parameters, the T must be a t 阅读全文
摘要:
You might have some changes locally for 3rd party library. For the local implementation, you need to modify the types in order to resolve IDE issue. W 阅读全文
摘要:
<!-- normal list --> <ul> <li>Here's a thing</li> <li>Another thing</li> <li>More things</li> <li><a href="#">A link in a thing</a></li> </ul> <!-- or 阅读全文
摘要:
Implement a type IsTuple, which takes an input type T and returns whether T is tuple type. For example: type case1 = IsTuple<[number]> // true type ca 阅读全文
摘要:
In This Challenge, You should implement a type Zip<T, U>, T and U must be Tuple type exp = Zip<[1, 2], [true, false]> // expected to be [[1, true], [2 阅读全文
摘要:
Implement type AllCombinations<S> that return all combinations of strings which use characters from S at most once. For example: type AllCombinations_ 阅读全文
摘要:
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, 阅读全文