fix: TypeScript model generation - use `declare` on all class fields and methods
Summary
- Fixes TypeScript model generation
- Related to issue https://github.com/sequelize/sequelize-auto/issues/600
-
declareall class fields … https://sequelize.org/docs/v6/core-concepts/model-basics/#caveat-with-public-class-fields
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
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?
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.
I too would like this merged as the lack of declare on TypeScript fields is causing problems using the models generated by this.
I need this too.
please merge this... should be a very fast review and a big bug fix...