-
Notifications
You must be signed in to change notification settings - Fork 285
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
No typesafety with CRUD operations #904
Comments
Just figured out that I could do: @Table
export class User extends Model<User> {
@Column
nickname: string
} Please add this to the docs to make it clear to anyone. I discovered in migration from older version |
After some testing, I found out that this option was terrible. Can you please provide a clean and documented way of being type safe with those operations. |
I would recommend using the V6 model definitions, but this isn't implemented in v2.0.0 yet. But PR #900 should fix this. I'm using the V6 model definitions already, it does work, but I had to ignore some TS errors. |
Hi @RoelVB, |
@johannb75 It's in the readme |
Well it's pretty bad... I get a lot of errors |
Hi,
Thanks for this awesome library.
I want to use
sequelize-typescript
but when I started I faced an issue:This doesn't throw an error even tho
blabla
was never defined.I have the exact same problem when creating a user:
It is totally accepted by the library even tho
blabla
was never defined andnickname
is anumber
and not a string like defined in the model.That is the first problem but because of that, the IDE doesn't provide any autocompletion.
Those 2 conditions are the main things Typescript was made for.
The text was updated successfully, but these errors were encountered: