Skip to content

Instantly share code, notes, and snippets.

@valterbarros
Created April 29, 2023 01:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valterbarros/4e95fdb85d0697112fb6ac082e30197d to your computer and use it in GitHub Desktop.
Save valterbarros/4e95fdb85d0697112fb6ac082e30197d to your computer and use it in GitHub Desktop.
class PromiseResolver {
constructor() {
this.promise_ = new Promise((resolve, reject) => {
this.resolve_ = resolve;
this.reject_ = reject;
})
}
get promise() { return this.promise_ }
get resolve() { return this.resolve_ }
get reject() { return this.reject_ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment