Skip to content
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

Typed create #11001

Closed
DanielRamosAcosta opened this issue May 25, 2019 · 3 comments
Closed

Typed create #11001

DanielRamosAcosta opened this issue May 25, 2019 · 3 comments
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.

Comments

@DanielRamosAcosta
Copy link

Is your feature request related to a problem? Please describe.
Right now, when calling create on a model, the values parameter is of object type, hiding possible type problems passed to the create.

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 method MyModel.create<CreationAttributes>(values).

@DanielRamosAcosta DanielRamosAcosta added the type: feature For issues and PRs. For new features. Never breaking changes. label May 25, 2019
@papb
Copy link
Member

papb commented Jul 16, 2019

You probably mean this line, right?

This is a good idea. Hopefully someone will be able to take this soon.

@papb papb added 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. and removed type: feature For issues and PRs. For new features. Never breaking changes. labels Jul 27, 2019
@aryem
Copy link
Contributor

aryem commented Aug 28, 2021

#12405 Closes this issue.

@DanielRamosAcosta @papb

@DanielRamosAcosta
Copy link
Author

Cosing then, @aryem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

3 participants