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

Investigate NODE-3843 - Typescript errors with recent @types/node package

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

      NODE-3843 Description

      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:
            Unassigned Unassigned
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: