From 43e5e227665b9f243523abb16fe29c7cffc90fdf Mon Sep 17 00:00:00 2001 From: Sean Lynch <42618346+swlynch99@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:52:43 -0800 Subject: [PATCH] Fix return type of AsyncDuckDBConnection.prepare This looks like it is supposed to return `AsyncPreparedStatement` but since the type parameter is not provided it actually returns `AsyncPreparedStatement`, which passes type checking anyway since `any` is compatible with `T`. --- packages/duckdb-wasm/src/parallel/async_connection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/duckdb-wasm/src/parallel/async_connection.ts b/packages/duckdb-wasm/src/parallel/async_connection.ts index 52a782267..783a18bd5 100644 --- a/packages/duckdb-wasm/src/parallel/async_connection.ts +++ b/packages/duckdb-wasm/src/parallel/async_connection.ts @@ -84,7 +84,7 @@ export class AsyncDuckDBConnection { /** Create a prepared statement */ public async prepare( text: string, - ): Promise { + ): Promise> { const stmt = await this._bindings.createPrepared(this._conn, text); return new AsyncPreparedStatement(this._bindings, this._conn, stmt); }