Skip to content

[@types/mongodb] Missing error parameter in abort() callback for GridFSBucketWriteStream #44549

Closed

Description

@alexy4744

Hi, this is a follow up issue for #44360. The callback definition for abort is missing an error parameter, which may be present if there was an error removing chunks.

https://mongodb.github.io/node-mongodb-native/3.6/api/GridFSBucketWriteStream.html#abort
https://mongodb.github.io/node-mongodb-native/3.6/api/GridFSBucket.html#~errorCallback
https://mongodb.github.io/node-mongodb-native/3.6/api/lib_gridfs-stream_upload.js.html#line112

const stream = bucket.openUploadStreamWithId(...);
stream.abort((error) => {});
Argument of type '(error: any) => void' is not assignable to parameter of type '() => void'.

Activity

  1. added a commit that references this issue on May 7, 2020
    d4d38c2
  2. peterblazejewicz commented on May 7, 2020

    @peterblazejewicz
    Member

    Not sure how it slipped under the radar, I've added now tests to cover different usage with callback,
    #44553 thanks!

  3. added a commit that references this issue on May 18, 2020
    b78ef10
  4. added a commit that references this issue on May 18, 2020
    23a359c
  5. added a commit that references this issue on Jun 16, 2020
    c7a41c5
  6. added a commit that references this issue on Jul 11, 2020
    a936266
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