sequelize / sequelize-auto

Automatically generate bare sequelize models from your database.
2.9k stars 527 forks source link

fix: TypeScript model generation - use `declare` on all class fields and methods #628

Open duki994 opened 1 year ago

duki994 commented 1 year ago

Summary

Description

All model classes were generated without declare keyword which made TypeScript to shadow Sequelize generated models.

Future plans

Create a PR with changes to code to use new InferAtributes and InferCreationAttributes

jmfirth-arkane commented 2 months ago

We would like to see this merged as it is currently causing issues in our TypeScript/ES2022 target codebase. What needs to be done to see this included?

duki994 commented 2 months ago

We would like to see this merged as it is currently causing issues in our TypeScript/ES2022 target codebase. What needs to be done to see this included?

Haven't worked in JS/TS ecosystem for a while.

I'll commit some of my OSS time to fix the issues as this modification had so many use cases across all TS projects I ever did.