Skip to content

Commit

Permalink
fix: correct .getInstance() type
Browse files Browse the repository at this point in the history
resolves #158
  • Loading branch information
pi0 committed Feb 26, 2025
1 parent 18b2bbc commit 6a7dc5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export type ExecResult = unknown;
/**
* Defines a database connector for executing SQL queries and preparing statements.
*/
export type Connector<TInstance = any> = {
export type Connector<TInstance = unknown> = {
/**
* The name of the connector.
*/
Expand Down Expand Up @@ -119,7 +119,7 @@ export interface Database<TConnector extends Connector = Connector> {
* The client instance used internally.
* @returns {Promise<TInstance>} A promise that resolves with the client instance.
*/
getInstance: () => Promise<TConnector["getInstance"]>;
getInstance: () => Promise<Awaited<ReturnType<TConnector["getInstance"]>>>;

/**
* Executes a raw SQL string.
Expand Down

0 comments on commit 6a7dc5a

Please sign in to comment.