From 929fcb73c3f5128e2d1d50eb5d62a6481d098754 Mon Sep 17 00:00:00 2001 From: benny-medflyt Date: Wed, 13 Dec 2017 11:20:29 +0200 Subject: [PATCH 1/3] Fix typings --- index.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index.d.ts b/index.d.ts index 55637511..d0fc7214 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,14 +1,14 @@ export function parse(connectionString: string): ConnectionOptions; export interface ConnectionOptions { - host: string | null; - password: string | null; - user: string | null; - port: number | null; - database: string | null; - client_encoding: string | null; - ssl: boolean | null; + host: string; + password?: string; + user?: string; + port: string | null; + database: string | null | undefined; + client_encoding?: string | undefined; + ssl?: boolean; - application_name: string | null; - fallback_application_name: string | null; + application_name?: string; + fallback_application_name?: string; } From ece764518774690ea8ee58360ae0b6ca7b248d4d Mon Sep 17 00:00:00 2001 From: benny-medflyt Date: Wed, 13 Dec 2017 11:23:28 +0200 Subject: [PATCH 2/3] typings: turns out "host" can actually be `null` --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index d0fc7214..2a657460 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,7 +1,7 @@ export function parse(connectionString: string): ConnectionOptions; export interface ConnectionOptions { - host: string; + host: string | null; password?: string; user?: string; port: string | null; From 726f6202fa7eb89096bf6cb8d32526ebacf4be49 Mon Sep 17 00:00:00 2001 From: benny-medflyt Date: Mon, 27 May 2019 08:30:21 -0400 Subject: [PATCH 3/3] Update index.d.ts --- index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 2a657460..1d2f1606 100644 --- a/index.d.ts +++ b/index.d.ts @@ -4,10 +4,10 @@ export interface ConnectionOptions { host: string | null; password?: string; user?: string; - port: string | null; + port?: string | null; database: string | null | undefined; - client_encoding?: string | undefined; - ssl?: boolean; + client_encoding?: string; + ssl?: boolean | string; application_name?: string; fallback_application_name?: string;