diff --git a/types/pg/index.d.ts b/types/pg/index.d.ts index 36d0b30762464d..7886828e2a0621 100644 --- a/types/pg/index.d.ts +++ b/types/pg/index.d.ts @@ -9,7 +9,6 @@ import events = require('events'); import stream = require('stream'); import pgTypes = require('pg-types'); -import { NoticeMessage } from 'pg-protocol/dist/messages'; import { ConnectionOptions } from 'tls'; @@ -249,8 +248,7 @@ export class ClientBase extends events.EventEmitter { escapeLiteral(str: string): string; on(event: 'drain', listener: () => void): this; - on(event: 'error', listener: (err: Error) => void): this; - on(event: 'notice', listener: (notice: NoticeMessage) => void): this; + on(event: 'error' | 'notice', listener: (err: Error) => void): this; on(event: 'notification', listener: (message: Notification) => void): this; // tslint:disable-next-line unified-signatures on(event: 'end', listener: () => void): this; diff --git a/types/pg/package.json b/types/pg/package.json index 58a04a01098227..f43d01c8b55702 100644 --- a/types/pg/package.json +++ b/types/pg/package.json @@ -1,7 +1,6 @@ { "private": true, "dependencies": { - "pg-types": "^2.2.0", - "pg-protocol": "^1.2.0" + "pg-types": "^2.2.0" } } diff --git a/types/pg/pg-tests.ts b/types/pg/pg-tests.ts index e9ecbbad053958..a20777d0395ee4 100644 --- a/types/pg/pg-tests.ts +++ b/types/pg/pg-tests.ts @@ -1,6 +1,5 @@ import { types, Client, CustomTypesConfig, QueryArrayConfig, Pool } from 'pg'; import TypeOverrides = require('pg/lib/type-overrides'); -import { NoticeMessage } from 'pg-protocol/dist/messages'; // https://github.com/brianc/node-pg-types // tslint:disable-next-line no-unnecessary-callback-wrapper @@ -22,7 +21,6 @@ const host: string = client.host; const password: string | undefined = client.password; const ssl: boolean = client.ssl; -client.on('notice', (notice: NoticeMessage) => console.warn(`${notice.severity}: ${notice.message}`)); client.connect(err => { if (err) { console.error('Could not connect to postgres', err);