Skip to content

Instantly share code, notes, and snippets.

@gparlakov
Last active January 20, 2019 15:15
Show Gist options
  • Save gparlakov/c625921d96e852c722a547d31a19a808 to your computer and use it in GitHub Desktop.
Save gparlakov/c625921d96e852c722a547d31a19a808 to your computer and use it in GitHub Desktop.
const source = from([1, 2, 3]);
source.subscribe(x => console.log('observable', x), null, () => console.info("completed"));
// observable 1
// observable 2
// observable 3
// completed
source.toPromise().then(x => console.log('toPromise', x));
// toPromise 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment