上一页 1 ··· 95 96 97 98 99 100 101 102 103 ··· 494 下一页
摘要: 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 阅读全文
posted @ 2022-10-23 20:38 Zhentiw 阅读(25) 评论(0) 推荐(0)
摘要: Implement type AllCombinations<S> that return all combinations of strings which use characters from S at most once. For example: type AllCombinations_ 阅读全文
posted @ 2022-10-23 02:34 Zhentiw 阅读(36) 评论(0) 推荐(0)
摘要: 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, 阅读全文
posted @ 2022-10-23 02:04 Zhentiw 阅读(21) 评论(0) 推荐(0)
摘要: // begin lesson code import { interval, fromEvent, of } from 'rxjs'; import { scan, mapTo, takeWhile, takeUntil, tap, startWith, endWith } from 'rxjs/ 阅读全文
posted @ 2022-10-22 16:43 Zhentiw 阅读(29) 评论(0) 推荐(0)
摘要: // begin lesson code import { fromEvent, partition } from 'rxjs'; import { filter, pluck } from 'rxjs/operators'; const MOVE_SPEED = 20; let leftPosit 阅读全文
posted @ 2022-10-22 16:31 Zhentiw 阅读(56) 评论(0) 推荐(0)
摘要: const onDestroy$ = new Subject(); fromEvent(document, 'click').pipe( map((event: any) => ({ x: event.clientX, y: event.clientY })), takeUntil(onDestro 阅读全文
posted @ 2022-10-22 16:20 Zhentiw 阅读(30) 评论(0) 推荐(0)
摘要: /* * From */ click$.pipe( mergeMapTo(throwError({ status: 400, message: 'Server error' }).pipe( retryWhen(attempts => { return attempts.pipe( mergeMap 阅读全文
posted @ 2022-10-22 16:13 Zhentiw 阅读(26) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2022-10-22 02:23 Zhentiw 阅读(30) 评论(0) 推荐(0)
摘要: 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, 阅读全文
posted @ 2022-10-21 18:40 Zhentiw 阅读(19) 评论(0) 推荐(0)
摘要: Implement the type of just-flip-object. Examples: Flip<{ a: "x", b: "y", c: "z" }>; // {x: 'a', y: 'b', z: 'c'} Flip<{ a: 1, b: 2, c: 3 }>; // {1: 'a' 阅读全文
posted @ 2022-10-21 18:34 Zhentiw 阅读(23) 评论(0) 推荐(0)
上一页 1 ··· 95 96 97 98 99 100 101 102 103 ··· 494 下一页