knex-migrate
knex-migrate copied to clipboard
Typescript support
I know this is unmaintained now but figured I'd request it anyway.
https://github.com/sheerun/knex-migrate/pull/47 tried to add support for TS but I keep getting import
or export
TS bugs with it.
~~Back to manually 50 migrations.~~ I just discovered knex migrate:rollback --all && knex migrate:latest
to flush my db. 🤤
@corysimmons just to clarify, the PR adds support for creating Typescript compatible migrations, not TypeScript support itself.
For typings, you can try this simplistic one. Should make Typescript behave better with it if using knex-migrate in code:
// @types/knex-migrate/index.d.ts
declare function knexMigrate(type: string, opts?: object, process?: Function): void;
declare module 'knex-migrate' {
export default knexMigrate;
}