Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3843

Typescript errors with recent @types/node package

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.0
    • Affects Version/s: None
    • Component/s: None
    • Not Needed

      What problem are you facing?

      node_modules/mongodb/mongodb.d.ts:3309:5 - error TS2416: Property 'end' in type 'GridFSBucketWriteStream' is not assignable to the same property in base type 'Writable'.
        Type '{ (): void; (chunk: Buffer): void; (callback: Callback<void | GridFSFile>): void; (chunk: Buffer, callback: Callback<void | GridFSFile>): void; (chunk: Buffer, encoding: BufferEncoding): void; (chunk: 
      Buffer, encoding: BufferEncoding | undefined, callback: Callback<...>): void; }' is not assignable to type '{ (cb?: (() => void) | undefined): this; (chunk: any, cb?: (() => void) | undefined): this; (chunk: any, encoding: BufferEncoding, cb?: (() => void) | undefined): this; }'.
          Type 'void' is not assignable to type 'this'.
            'this' could be instantiated with an arbitrary type which could be unrelated to 'void'.
      
      3309     end(): void;
               ~~~

      What driver and relevant dependency versions are you using?

      mongodb: 4.2.2
      @types/node: 16.11.18

      Steps to reproduce?

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            orgads@gmail.com Orgad Shaneh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: