-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
Model generated - Declaring public class fields error - Typescript #600
Comments
Also, all the |
I am currently manually using |
According to https://sequelize.org/master/manual/typescript.html. We do need to use |
Yeah, the later versions of typescript are making things harder. |
Any update on this? How can I solve this problem? |
I'm generating models with these switches on
--cp p --cf p --cm p
.After the models are initialized, while querying, sequelize produces the following error.
(sequelize) Warning: Model "UsersToRoles" is declaring public class fields for attribute(s): "IdUser", "IdRole", "RoleName"
The model file has the following data generated..
As given here, If I add
declare
in front of the properties. The error goes away.Using
sequelize@6.15.1
andsequelize-auto@0.8.8
This issue did not occur in older versions with the same schema.... I upgraded sequelize and sequelize auto and this issue showed up.
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: