Wrap any node-style callback function with a promise.
npm install typeable-promisify- Wrap any node-style callback function with a promise.
- Allows you to specify your own type annotations.
- Strongly typed.
``js
// @flow
import promisify from 'typeable-promisify';
let writeFileAsync = (filePath: string, fileContents: string): Promise
return promisify(cb => writeFile(filePath, fileContents, cb));
};
writeFileAsync('fileName', 'fileContents').then(() => {});
``