Typed create #11001
Labels
status: understood
For issues. Applied when the issue is understood / reproducible.
type: other
For issues and PRs. Something that does not fit in any of the other "type:" labels.
type: typescript
For issues and PRs. Things that involve typescript, such as typings and intellisense.
Is your feature request related to a problem? Please describe.
Right now, when calling
create
on a model, thevalues
parameter is of object type, hiding possible type problems passed to thecreate
.Describe the solution you'd like
It would be nice to have a generic type here, so we would be able to force some type.
Why should this be in Sequelize
Becouse types are now shipped here.
Usage example
It would be nice to have it at the class definition in some way, some generic type like
class MyModel extends Model<CreationAttrbutes>
or in the create methodMyModel.create<CreationAttributes>(values)
.The text was updated successfully, but these errors were encountered: