Function decorators: Transforming callbacks into promises and back again
Joel Thoms
1963

This is exactly what I was looking for, but could you give a more detailed example with async/await please ? Can’t manage to get resolve/reject working… Code never gets passed my promisified function?!

eg :

await promisify(exec)(

'npm run tslint:typecheck',

(err: Error, stdout: string, stderr: string) => {

if (errors.length > 0) {

return Promise.reject(errors);

}

return Promise.resolve();

},

);

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.