Skip to content

Conversation

@jeengbe
Copy link
Contributor

@jeengbe jeengbe commented Sep 9, 2025

closes #1576.

mysql2 have updated their types, which causes types issues: sidorares/node-mysql2#3784

For searchability:

error TS2322: Type 'Pool' is not assignable to type 'MysqlPool | (() => Promise<MysqlPool>)'.
  Type 'Pool' is not assignable to type 'MysqlPool'.
    Types of property 'getConnection' are incompatible.
      Type '(callback: (err: ErrnoException | null, connection: PoolConnection) => any) => void' is not assignable to type '(callback: (error: unknown, connection: MysqlPoolConnection) => void) => void'.
        Types of parameters 'callback' and 'callback' are incompatible.
          Types of parameters 'connection' and 'connection' are incompatible.
            Type 'PoolConnection' is not assignable to type 'MysqlPoolConnection'.
              Types of property 'query' are incompatible.
                Type '{ <T extends QueryResult>(sql: string, callback?: ((err: QueryError | null, result: T, fields: FieldPacket[]) => any) | undefined): Query; <T extends QueryResult>(sql: string, values: any, callback?: ((err: QueryError | null, result: T, fields: FieldPacket[]) => any) | undefined): Query; <T extends QueryResult>(opti...' is not assignable to type '{ (sql: string, parameters: readonly unknown[]): { stream: <T>(options: MysqlStreamOptions) => MysqlStream<T>; }; (sql: string, parameters: readonly unknown[], callback: (error: unknown, result: MysqlQueryResult) => void): void; }'.
                  Types of parameters 'callback' and 'parameters' are incompatible.
                    Type 'readonly unknown[]' is not assignable to type '(err: QueryError | null, result: any, fields: FieldPacket[]) => any'.
                      Type 'readonly unknown[]' provides no match for the signature '(err: QueryError | null, result: any, fields: FieldPacket[]): any'.

@vercel
Copy link

vercel bot commented Sep 9, 2025

@jeengbe is attempting to deploy a commit to the Kysely Team Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 10, 2025

kysely_koa_example

npm i https://pkg.pr.new/kysely-org/kysely@1574

commit: 22e86ac

@igalklebanov igalklebanov added bug Something isn't working mysql Related to MySQL built-in dialect Related to a built-in dialect typescript Related to Typescript labels Sep 13, 2025
Copy link
Member

@igalklebanov igalklebanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey 👋

Thanks! 🙏

LGTM! 🚀

@igalklebanov igalklebanov merged commit 4d66753 into kysely-org:master Sep 13, 2025
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working built-in dialect Related to a built-in dialect mysql Related to MySQL typescript Related to Typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MysqlPool type issue

2 participants