Skip to content

Commit 236d93e

Browse files
committed
add casting to prevent docs fail
1 parent 3e47871 commit 236d93e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

connection/connection.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export class Connection {
295295
}
296296

297297
async #openTlsConnection(
298-
connection: Deno.Conn,
298+
connection: Deno.TcpConn,
299299
options: { hostname: string; caCerts: string[] },
300300
) {
301301
this.#conn = await Deno.startTls(connection, options);
@@ -354,7 +354,8 @@ export class Connection {
354354
// https://www.postgresql.org/docs/14/protocol-flow.html#id-1.10.5.7.11
355355
if (accepts_tls) {
356356
try {
357-
await this.#openTlsConnection(this.#conn, {
357+
// TODO: handle connection type without casting
358+
await this.#openTlsConnection(this.#conn as Deno.TcpConn, {
358359
hostname,
359360
caCerts: caCertificates,
360361
});

0 commit comments

Comments
 (0)