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

sequelizeCrud wrong typing #43

Closed
Kamitenshi opened this issue Feb 16, 2021 · 1 comment
Closed

sequelizeCrud wrong typing #43

Kamitenshi opened this issue Feb 16, 2021 · 1 comment
Labels

Comments

@Kamitenshi
Copy link

`const insertStandardTag: Create<number, StandardTag> = (
parameters: StandardTag
) => {
return StandardTag.create(parameters)
}

adminRouter.use(
crud('/standard-tags', {
...sequelizeCrud(StandardTag),
create: insertStandardTag,
update: null,
getOne: null,
})
)`

This code produce the following issue:

Type 'Create<number, StandardTag>' is not assignable to type 'Create<number, unknown>'.
Types of parameters 'body' and 'body' are incompatible.
Type 'unknown' is not assignable to type 'StandardTag'.

The issue might be link to the following todo

@nicgirault
Copy link
Owner

🎉 This issue has been resolved in version 6.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants