From 236d93e74733aabe7162da022bdcf878d9a88b45 Mon Sep 17 00:00:00 2001 From: bombillazo Date: Mon, 23 Sep 2024 12:25:59 -0400 Subject: [PATCH] add casting to prevent docs fail --- connection/connection.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/connection/connection.ts b/connection/connection.ts index d5bfed3..a9862fe 100644 --- a/connection/connection.ts +++ b/connection/connection.ts @@ -295,7 +295,7 @@ export class Connection { } async #openTlsConnection( - connection: Deno.Conn, + connection: Deno.TcpConn, options: { hostname: string; caCerts: string[] }, ) { this.#conn = await Deno.startTls(connection, options); @@ -354,7 +354,8 @@ export class Connection { // https://www.postgresql.org/docs/14/protocol-flow.html#id-1.10.5.7.11 if (accepts_tls) { try { - await this.#openTlsConnection(this.#conn, { + // TODO: handle connection type without casting + await this.#openTlsConnection(this.#conn as Deno.TcpConn, { hostname, caCerts: caCertificates, });