上一页 1 ··· 106 107 108 109 110 111 112 113 114 ··· 496 下一页
摘要: ShareReplay is using ReplaySubject. It will reply the messages to later subscribers. It turns unicast observable to multicase observable. shareReplay( 阅读全文
posted @ 2022-09-26 13:29 Zhentiw 阅读(193) 评论(0) 推荐(0)
摘要: Store.js import { BehaviorSubject, Subject } from 'rxjs'; import { map, distinctUntilKeyChanged, scan } from 'rxjs/operators'; export class Observable 阅读全文
posted @ 2022-09-26 13:19 Zhentiw 阅读(42) 评论(0) 推荐(0)
摘要: Replace the camelCase or PascalCase string with kebab-case. FooBarBaz -> foo-bar-baz For example type FooBarBaz = KebabCase<"FooBarBaz">; const foobar 阅读全文
posted @ 2022-09-26 03:02 Zhentiw 阅读(42) 评论(0) 推荐(0)
摘要: Merge two types into a new type. Keys of the second type overrides keys of the first type. For example type foo = { name: string; age: string; } type 阅读全文
posted @ 2022-09-25 03:12 Zhentiw 阅读(49) 评论(0) 推荐(0)
摘要: Implement the String to Union type. Type take string argument. The output should be a union of input letters For example type Test = '123'; type Resul 阅读全文
posted @ 2022-09-16 16:25 Zhentiw 阅读(31) 评论(0) 推荐(0)
摘要: Implement the Absolute type. A type that take string, number or bigint. The output should be a positive number string For example type Test = -100; ty 阅读全文
posted @ 2022-09-16 16:18 Zhentiw 阅读(22) 评论(0) 推荐(0)
摘要: Subject as resource can be shared amount multi observers. Normal Observable pattern is Cold observable, each subscription will get its own resource: i 阅读全文
posted @ 2022-09-15 21:06 Zhentiw 阅读(50) 评论(0) 推荐(0)
摘要: In this challenge, you would need to write a type that takes an array and emitted the flatten array type. For example: type flatten = Flatten<[1, 2, [ 阅读全文
posted @ 2022-09-15 14:32 Zhentiw 阅读(30) 评论(0) 推荐(0)
摘要: Implement permutation type that transforms union types into the array that includes permutations of unions. type perm = Permutation<'A' | 'B' | 'C'>; 阅读全文
posted @ 2022-09-15 01:36 Zhentiw 阅读(51) 评论(0) 推荐(0)
摘要: Write a function that takes in an array of unique integers and returns an array of all permutations of those integers in no particular order. If the i 阅读全文
posted @ 2022-09-15 01:11 Zhentiw 阅读(38) 评论(0) 推荐(0)
上一页 1 ··· 106 107 108 109 110 111 112 113 114 ··· 496 下一页