摘要:
Implement Python liked any function in the type system. A type takes the Array and returns true if any element of the Array is true. If the Array is e 阅读全文
摘要:
microtask -> requestAnimationFrame -> macrotask Each scheduler can just take callback as arguement asyncScheduler.schedule(() => console.log('async')) 阅读全文
摘要:
Get an Object that is the difference between O & O1 /* _____________ Your Code Here _____________ */ type Diff<T, S> = { [K in Exclude<(keyof T | keyo 阅读全文
摘要:
ShareReplay is using ReplaySubject. It will reply the messages to later subscribers. It turns unicast observable to multicase observable. shareReplay( 阅读全文
摘要:
Replace the camelCase or PascalCase string with kebab-case. FooBarBaz -> foo-bar-baz For example type FooBarBaz = KebabCase<"FooBarBaz">; const foobar 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文