摘要: For example we have a search input: const input$ = fromEvent(document.getElementById("#input"), "input"); input$ .pipe( debounceTime(200), pluck("targ 阅读全文
posted @ 2022-10-14 20:56 Zhentiw 阅读(76) 评论(0) 推荐(0) 编辑
摘要: const { TestScheduler } = require("rxjs/testing"); const { map, take, delay, mapTo, catchError } = require("rxjs/operators"); const { concat, from, of 阅读全文
posted @ 2022-10-14 20:24 Zhentiw 阅读(36) 评论(0) 推荐(0) 编辑
摘要: describe("Marble testing in Rxjs", () => { let testScheduler; beforeEach(() => { testScheduler = new TestScheduler((actual, expected) => { expect(actu 阅读全文
posted @ 2022-10-14 20:20 Zhentiw 阅读(13) 评论(0) 推荐(0) 编辑
摘要: const { TestScheduler } = require("rxjs/testing"); const { map, take, delay, mapTo, catchError } = require("rxjs/operators"); const { concat, from, of 阅读全文
posted @ 2022-10-14 19:35 Zhentiw 阅读(21) 评论(0) 推荐(0) 编辑
摘要: Implement a generic RequiredByKeys<T, K> which takes two type argument T and K. K specify the set of properties of T that should set to be required. W 阅读全文
posted @ 2022-10-14 19:14 Zhentiw 阅读(15) 评论(0) 推荐(0) 编辑
摘要: Implement a generic PartialByKeys<T, K> which takes two type argument T and K. K specify the set of properties of T that should set to be optional. Wh 阅读全文
posted @ 2022-10-14 19:04 Zhentiw 阅读(20) 评论(0) 推荐(0) 编辑
摘要: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API const app = document.getElementById('app'); app.innerHTML = ` <h1>JavaScript HTML5 APIs 阅读全文
posted @ 2022-10-14 16:03 Zhentiw 阅读(18) 评论(0) 推荐(0) 编辑
摘要: Implement EndsWith<T, U> which takes two exact string types and returns whether T ends with U For example: type a = EndsWith<'abc', 'bc'> // expected 阅读全文
posted @ 2022-10-14 01:40 Zhentiw 阅读(16) 评论(0) 推荐(0) 编辑
摘要: Implement StartsWith<T, U> which takes two exact string types and returns whether T starts with U For example type a = StartsWith<'abc', 'ac'> // expe 阅读全文
posted @ 2022-10-14 01:38 Zhentiw 阅读(20) 评论(0) 推荐(0) 编辑
摘要: From T, pick a set of properties whose type are assignable to U. For Example type OnlyBoolean = PickByType<{ name: string count: number isReadonly: bo 阅读全文
posted @ 2022-10-14 01:31 Zhentiw 阅读(12) 评论(0) 推荐(0) 编辑