Created
December 20, 2017 16:09
-
-
Save jooyunghan/bdf979c25cca5b4d853996e437e6bb84 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
async function consume2(obs) { | |
const ai = obs[Symbol.asyncIterator](); | |
ai.next().then(r => console.log(0, r), e => console.log(0, e.message)); | |
ai.next().then(r => console.log(1, r), e => console.log(1, e.message)); | |
ai.next().then(r => console.log(2, r), e => console.log(2, e.message)); | |
ai.next().then(r => console.log(3, r), e => console.log(3, e.message)); | |
} | |
consume2(Observable.interval(100).do(n => console.assert(n < 1))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment