Skip to content

Commit 86bca17

Browse files
authored
🤖 Merge PR DefinitelyTyped#73934 chore(pg): Missed Query class constructor params by @npdev453
1 parent 0074aa6 commit 86bca17

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎types/pg/index.d.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,15 @@ export interface PoolClient extends ClientBase {
307307
export class Query<R extends QueryResultRow = any, I extends any[] = any> extends events.EventEmitter
308308
implements Submittable
309309
{
310-
constructor(queryTextOrConfig?: string | QueryConfig<I>, values?: QueryConfigValues<I>);
310+
constructor(
311+
queryTextOrConfig?: string | QueryConfig<I>,
312+
callback?: (error: Error | undefined, result: ResultBuilder<R>) => void,
313+
);
314+
constructor(
315+
queryTextOrConfig?: string | QueryConfig<I>,
316+
values?: I,
317+
callback?: (error: Error | undefined, result: ResultBuilder<R>) => void,
318+
);
311319
submit: (connection: Connection) => void;
312320
on(event: "row", listener: (row: R, result?: ResultBuilder<R>) => void): this;
313321
on(event: "error", listener: (err: Error) => void): this;

0 commit comments

Comments
 (0)