This library is a wrapper of async functions of Node.js fs module using @ts-task instead of Promises.
Install it
npm i @ts-task/fsUse it
import*asfsfrom'@ts-task/fs';fs.readFile('./README.md').fork(err=>{err;// $ExpectType ErrnoExceptionif(err.code==='ENOENT'){console.error('Buu, the file does not exists');}},buffer=>{buffer;// ExpectType Bufferconsole.log(buffer.toString());})You can see the API reference here.
You can see more example usages in the types test file.