ts-promisify-callback
Turns any function ending with the "popular" (Error, Result)
callback format into a Promise
. Type-safe!
Install
npm install ts-promisify-callback
Usage
IMPORTANT: This library requires typescript@^4.0
(currently in beta)!
; ;// let helloAsPromise: (name: string, age: number) => Promise<string> ;
Contributing
This is a very simple library, but I'm sure there are many ways to improve it to be more flexible...
Pull Requests Welcome!