Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promise-based API #79

Open
stevenvachon opened this issue May 1, 2017 · 1 comment
Open

Promise-based API #79

stevenvachon opened this issue May 1, 2017 · 1 comment

Comments

@stevenvachon
Copy link
Contributor

Cleaner, specification-standard, and better supports async/await.

@cdibbs
Copy link

cdibbs commented May 28, 2018

I agree. Promises would be a big improvement, given TypeScript, ES6, and such.

Look how clean it could be...

public async launch(opts: LaunchOptions): Promise<any> {
  try {
    const launcher = await launchpad.getLocalLauncher();
    const instance = await launcher.launch('http://localhost:1234', opts);
    // do things...
  } catch(ex) {
    // handle rejected promises from getLauncher or launch
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants