types / mysql2

Typings for https://github.com/sidorares/node-mysql2
ISC License
41 stars 23 forks source link

Interface 'Pool' incorrectly extends interface 'Connection'. #48

Closed trevorr closed 4 years ago

trevorr commented 4 years ago

The most recent commit fails to compile (using TS 3.8.3):

node_modules/@types/mysql2/index.d.ts:19:18 - error TS2430: Interface 'Pool' incorrectly extends interface 'Connection'.
  Types of property 'end' are incompatible.
    Type '(callback?: ((err: Error) => any) | undefined) => void' is not assignable to type '{ (callback?: ((err: QueryError | null) => void) | undefined): void; (options: any, callback?: ((err: QueryError | null) => void) | undefined): void; }'.
      Types of parameters 'callback' and 'callback' are incompatible.
        Types of parameters 'err' and 'err' are incompatible.
          Type 'Error' is missing the following properties from type 'QueryError': code, fatal

19 export interface Pool extends mysql.Connection {
                    ~~~~