Open stevenvachon opened 7 years ago
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
}
}
Cleaner, specification-standard, and better supports async/await.