Skip to content

Instantly share code, notes, and snippets.

@saravanapriyanm
Created February 15, 2022 05:10
Show Gist options
  • Save saravanapriyanm/465e22e25934853f3958ed3237124a5f to your computer and use it in GitHub Desktop.
Save saravanapriyanm/465e22e25934853f3958ed3237124a5f to your computer and use it in GitHub Desktop.
Promise and Observable dev mock response
// Promise
return new Promise((resolve, reject) => {
resolve(true);
});
// RxJs Observable
return new Observable(subscriber => {
subscriber.next(true);
subscriber.complete();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment