diff --git a/types/pg/index.d.ts b/types/pg/index.d.ts index 1383dc2a22..ec5b929aa4 100644 --- a/types/pg/index.d.ts +++ b/types/pg/index.d.ts @@ -15,6 +15,7 @@ export interface ConnectionConfig { password?: string; port?: number; host?: string; + connectionString?: string; } export interface Defaults extends ConnectionConfig { diff --git a/types/pg/pg-tests.ts b/types/pg/pg-tests.ts index bc1bfd30e0..1f1e312544 100644 --- a/types/pg/pg-tests.ts +++ b/types/pg/pg-tests.ts @@ -77,6 +77,10 @@ client.end() .then(() => console.log('client has disconnected')) .catch(err => console.error('error during disconnection', err.stack)); +const poolOne = new pg.Pool({ + connectionString: 'postgresql://dbuser:secretpassword@database.server.com:3211/mydb' +}); + const pool = new pg.Pool({ host: 'localhost', port: 5432,