-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promisifying of fs may not be correct #2
Comments
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The wrap function only deals with first two arguments of the original function's callback. This may not work properly for any function which give more than 2 args in their result callback like fs.read and fs.write. They produce 3 args in the result callbacks (err: NodeJS.ErrnoException, bytesRead: number, buffer: TBuffer)
https://github.com/bcoin-org/blgr/blob/master/lib/fs.js#L15
The text was updated successfully, but these errors were encountered: