From 352c3bc5504d6cb8d9837771a2fa8673db7eb001 Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Fri, 30 Jun 2023 10:56:28 -0300 Subject: [PATCH] fix: add `ProcedureCallPacket` to `query` overloads --- .../lib/protocol/sequences/QueryableBase.d.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/typings/mysql/lib/protocol/sequences/QueryableBase.d.ts b/typings/mysql/lib/protocol/sequences/QueryableBase.d.ts index c5c3857486..a6eb9d1028 100644 --- a/typings/mysql/lib/protocol/sequences/QueryableBase.d.ts +++ b/typings/mysql/lib/protocol/sequences/QueryableBase.d.ts @@ -3,6 +3,7 @@ import { FieldPacket, RowDataPacket, ResultSetHeader, + ProcedureCallPacket, } from '../packets/index.js'; import { Query, @@ -10,6 +11,7 @@ import { QueryOptions, QueryableConstructor, } from './Query.js'; + export declare function QueryableBase( Base?: T ): { @@ -21,6 +23,7 @@ export declare function QueryableBase( | RowDataPacket[] | RowDataPacket[][] | OkPacket[] + | ProcedureCallPacket >( sql: string, callback?: @@ -28,44 +31,47 @@ export declare function QueryableBase( | undefined ): Query; query< - T_1 extends + T extends | OkPacket | ResultSetHeader | RowDataPacket[] | RowDataPacket[][] | OkPacket[] + | ProcedureCallPacket >( sql: string, values: any, callback?: - | ((err: QueryError | null, result: T_1, fields: FieldPacket[]) => any) + | ((err: QueryError | null, result: T, fields: FieldPacket[]) => any) | undefined ): Query; query< - T_2 extends + T extends | OkPacket | ResultSetHeader | RowDataPacket[] | RowDataPacket[][] | OkPacket[] + | ProcedureCallPacket >( options: QueryOptions, callback?: - | ((err: QueryError | null, result: T_2, fields?: FieldPacket[]) => any) + | ((err: QueryError | null, result: T, fields?: FieldPacket[]) => any) | undefined ): Query; query< - T_3 extends + T extends | OkPacket | ResultSetHeader | RowDataPacket[] | RowDataPacket[][] | OkPacket[] + | ProcedureCallPacket >( options: QueryOptions, values: any, callback?: - | ((err: QueryError | null, result: T_3, fields: FieldPacket[]) => any) + | ((err: QueryError | null, result: T, fields: FieldPacket[]) => any) | undefined ): Query; };