diff --git a/packages/mysql/test-d/index.test-d.ts b/packages/mysql/test-d/index.test-d.ts index de5e79d8..ff88e10f 100644 --- a/packages/mysql/test-d/index.test-d.ts +++ b/packages/mysql/test-d/index.test-d.ts @@ -12,25 +12,22 @@ const mysql2 = captureMySQL(MySQL2); const config = {}; +const connectionMySQL: captureMySQL.PatchedConnection = mysql.createConnection(config); +const poolMySQL: captureMySQL.PatchedPool = mysql.createPool(config); +const poolClusterMySQL: captureMySQL.PatchedPoolCluster = mysql.createPoolCluster(config); + const queryCallback: MySQL.queryCallback = function (err: MySQL.MysqlError | null, rows: any) { }; -const queryCallbackMySQL2: captureMySQL.MySQL2QueryCallback | undefined = function () { }; - const getConnectionCallback = function (err: MySQL.MysqlError, conn: captureMySQL.PatchedConnection) { }; -const getConnectionCallbackMySQL2 = function (err: MySQL.MysqlError, conn: captureMySQL.PatchedMySQL2Connection) { -}; - -const connectionMySQL: captureMySQL.PatchedConnection = mysql.createConnection(config); -const poolMySQL: captureMySQL.PatchedPool = mysql.createPool(config); -const poolClusterMySQL: captureMySQL.PatchedPoolCluster = mysql.createPoolCluster(config); - const connectionMySQL2: captureMySQL.PatchedMySQL2Connection = mysql2.createConnection(config); const poolMySQL2: captureMySQL.PatchedMySQL2Pool = mysql2.createPool(config); const poolClusterMySQL2: captureMySQL.PatchedMySQL2PoolCluster = mysql2.createPoolCluster(config); +const queryCallbackMySQL2: captureMySQL.MySQL2QueryCallback | undefined = function () { }; + expectType(connectionMySQL.query('SELECT * FROM cats', queryCallback)); expectType(connectionMySQL.query('SELECT * FROM cats', queryCallback, segment));