diff --git a/types/pg/index.d.ts b/types/pg/index.d.ts index da6f4db575..258188c937 100644 --- a/types/pg/index.d.ts +++ b/types/pg/index.d.ts @@ -60,6 +60,12 @@ export interface QueryResult { rows: any[]; } +export interface Notification { + processId: number, + channel: string, + payload?: string +} + export interface ResultBuilder extends QueryResult { addRow(row: any): void; } @@ -109,7 +115,7 @@ export declare class Client extends events.EventEmitter { on(event: "drain", listener: () => void): this; on(event: "error", listener: (err: Error) => void): this; - on(event: "notification" | "notice", listener: (message: any) => void): this; + on(event: "notification" | "notice", listener: (message: Notification) => void): this; on(event: "end", listener: () => void): this; }