Skip to content

Promisifying of fs may not be correct #2

Description

@malisetti

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions