Last active
December 22, 2023 12:07
-
-
Save danmt/d9735d58855c7849d848cb1f349dacf7 to your computer and use it in GitHub Desktop.
Turn Factory of Promises into an Observable Factory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type AsObservableFactory<T> = T extends (...a: infer U) => Promise<infer V> | |
? (...a: U) => Observable<V> | |
: never; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment