Skip to content

Commit 41c03be

Browse files
swlynch99carlopi
authored andcommitted
Fix return type of AsyncDuckDBConnection.prepare
This looks like it is supposed to return `AsyncPreparedStatement<T>` but since the type parameter is not provided it actually returns `AsyncPreparedStatement<any>`, which passes type checking anyway since `any` is compatible with `T`.
1 parent 7d3db7e commit 41c03be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/duckdb-wasm/src/parallel/async_connection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class AsyncDuckDBConnection {
8484
/** Create a prepared statement */
8585
public async prepare<T extends { [key: string]: arrow.DataType } = any>(
8686
text: string,
87-
): Promise<AsyncPreparedStatement> {
87+
): Promise<AsyncPreparedStatement<T>> {
8888
const stmt = await this._bindings.createPrepared(this._conn, text);
8989
return new AsyncPreparedStatement<T>(this._bindings, this._conn, stmt);
9090
}

0 commit comments

Comments
 (0)