Fixed types for migration utils (#14709)

`import('knex')` does not refer to the type of an instantiated Knex instance.
This commit is contained in:
Fabien 'egg' O'Carroll 2022-05-05 15:01:22 +01:00 committed by GitHub
parent 51498abb5c
commit e65d335c76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -274,8 +274,8 @@ function addPermissionWithRoles(config, roles) {
}
/**
* @param {(connection: import('knex')) => Promise<void>} up
* @param {(connection: import('knex')) => Promise<void>} down
* @param {(connection: import('knex').Knex) => Promise<void>} up
* @param {(connection: import('knex').Knex) => Promise<void>} down
*
* @returns {Migration}
*/
@ -294,7 +294,7 @@ function createNonTransactionalMigration(up, down) {
}
/**
* @param {(connection: import('knex')) => Promise<void>} up
* @param {(connection: import('knex').Knex) => Promise<void>} up
*
* @returns {Migration}
*/
@ -313,8 +313,8 @@ function createIrreversibleMigration(up) {
}
/**
* @param {(connection: import('knex')) => Promise<void>} up
* @param {(connection: import('knex')) => Promise<void>} down
* @param {(connection: import('knex').Knex) => Promise<void>} up
* @param {(connection: import('knex').Knex) => Promise<void>} down
*
* @returns {Migration}
*/
@ -601,7 +601,7 @@ module.exports = {
/**
* @typedef {Object} TransactionalMigrationFunctionOptions
*
* @prop {import('knex')} transacting
* @prop {import('knex').Knex} transacting
*/
/**