Created
August 23, 2017 01:06
-
-
Save benlesh/da9634b1c1975e9c156868f088d61833 to your computer and use it in GitHub Desktop.
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
const source$ = Observable.interval(1000).take(3); // 0, 1, 2 | |
// waits 3 seconds, then logs "2". | |
// because the observable takes 3 seconds to complete, and | |
// the interval emits incremented numbers starting at 0 | |
async function test() { | |
console.log(await source$.toPromise()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment