mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
result in Client.query() callback has the same type with result object in Query end event. (#9307)
This commit is contained in:
committed by
Masahiro Wakame
parent
adfe4a9c78
commit
53ed90b6e7
@@ -35,6 +35,7 @@ client.connect((err) => {
|
||||
if (err) {
|
||||
return console.error("Error running query", err);
|
||||
}
|
||||
console.log(result.rowCount);
|
||||
console.log(result.rows[0]["theTime"]);
|
||||
client.end();
|
||||
return null;
|
||||
|
||||
Vendored
+3
-3
@@ -40,13 +40,13 @@ declare module "pg" {
|
||||
}
|
||||
|
||||
export interface QueryResult {
|
||||
command: string;
|
||||
rowCount: number;
|
||||
oid: number;
|
||||
rows: any[];
|
||||
}
|
||||
|
||||
export interface ResultBuilder extends QueryResult {
|
||||
command: string;
|
||||
rowCount: number;
|
||||
oid: number;
|
||||
addRow(row: any): void;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user