Closed rentalhost closed 1 week ago
Hello!
I noticed that the following code can be made more flexible, as it is not necessary to use async, given that createPool() is not:
async
createPool()
https://github.com/kysely-org/kysely/blob/e71bbc4fd796c3e6de1eb5991740ff649d1a992f/src/dialect/mysql/mysql-dialect-config.ts#L16
However, to avoid breaking changes, I believe it's sufficient to extend the support:
pool: MysqlPool | (() => MysqlPool) | (() => Promise<MysqlPool>);
This prevents errors like the following:
Thank you!
Hello!
I noticed that the following code can be made more flexible, as it is not necessary to use
async
, given thatcreatePool()
is not:https://github.com/kysely-org/kysely/blob/e71bbc4fd796c3e6de1eb5991740ff649d1a992f/src/dialect/mysql/mysql-dialect-config.ts#L16
However, to avoid breaking changes, I believe it's sufficient to extend the support:
This prevents errors like the following:
Thank you!