From 77510fddebce84077879bcf499dc3aeed7b689aa Mon Sep 17 00:00:00 2001 From: Jim Fisher Date: Sun, 17 Oct 2021 17:05:53 +0100 Subject: [PATCH] ConnectionOptions interface is incompatible with @types/pg definitions Using pg-connection-string with @types/pg currently results in a type error like this: Argument of type 'ConnectionOptions' is not assignable to parameter of type 'PoolConfig'. Types of property 'database' are incompatible. Type 'string | null | undefined' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'string | undefined'.ts(2345) See clashing definition: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/08f0feedca9329fe95d23ccc64886e3db03195bf/types/pg/index.d.ts#L18 --- packages/pg-connection-string/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pg-connection-string/index.d.ts b/packages/pg-connection-string/index.d.ts index 3081270e2..8c1f7359f 100644 --- a/packages/pg-connection-string/index.d.ts +++ b/packages/pg-connection-string/index.d.ts @@ -5,7 +5,7 @@ export interface ConnectionOptions { password?: string user?: string port?: string | null - database: string | null | undefined + database: string | undefined client_encoding?: string ssl?: boolean | string