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 usage #194

Open
helmerdavila opened this issue Aug 23, 2019 · 1 comment
Open

Typescript usage #194

helmerdavila opened this issue Aug 23, 2019 · 1 comment

Comments

@helmerdavila
Copy link

How can I use this package with TS?

Thanks.

@kwhi291
Copy link

kwhi291 commented Aug 2, 2024

typescript works fine the only catch I had was in the model file since you're doing es6 style imports

that on the .paginate() wrapper you have to specify type like this (example you're in a User.ts class)

sequelizePaginate.paginate(model as unknown as Model<User, UserAttributes>);

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