Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript support #63

Open
corysimmons opened this issue May 16, 2021 · 1 comment
Open

Typescript support #63

corysimmons opened this issue May 16, 2021 · 1 comment

Comments

@corysimmons
Copy link

corysimmons commented May 16, 2021

I know this is unmaintained now but figured I'd request it anyway.

#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. 🤤

@kurbar
Copy link

kurbar commented Jun 3, 2021

@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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants