From b8b063f64b46dbec26bf792b8928060ffe2af7b6 Mon Sep 17 00:00:00 2001 From: Victor Widell Date: Mon, 6 Feb 2017 11:47:15 +0100 Subject: [PATCH] Made overloads work with union types. https://github.com/Microsoft/TypeScript/issues/1805 --- pg/index.d.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pg/index.d.ts b/pg/index.d.ts index 75f3f33dd5..b819d6b66b 100644 --- a/pg/index.d.ts +++ b/pg/index.d.ts @@ -96,11 +96,10 @@ export declare class Client extends events.EventEmitter { end(callback?: (err: Error) => void): void; release(): void; - query(queryText: string): Promise; + query(queryTextOrConfig: string | QueryConfig): Promise; query(queryText: string, values: any[]): Promise; - query(queryText: string, callback?: (err: Error, result: QueryResult) => void): Query; - query(config: QueryConfig, callback?: (err: Error, result: QueryResult) => void): Query; + query(queryTextOrConfig: string | QueryConfig, callback?: (err: Error, result: QueryResult) => void): Query; query(queryText: string, values: any[], callback?: (err: Error, result: QueryResult) => void): Query; copyFrom(queryText: string): stream.Writable;