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

Documentation for BelongsToSetAssociationMixin outdated? #80

Open
aendra-rininsland opened this issue Dec 22, 2016 · 1 comment
Open

Comments

@aendra-rininsland
Copy link

aendra-rininsland commented Dec 22, 2016

I tried using this syntax earlier today from here and it wasn't working:


interface UserInstance extends Sequelize.Instance<UserInstance, UserAttributes>, UserAttributes {
   // getRole...
   setRole: Sequelize.BelongsToSetAssociationMixin<RoleInstance, RoleId>;
   // createRole...
}

TypeScript (2.0.3 btw) complains that Generic type 'Instance<TAttributes>' requires 1 type argument(s). Replacing it with Sequelize.Instance<UserAttributes> seems to work.

Further, RoleId isn't described in the documentation; what is that value from? I supplied the type keyword for what that field is in my RoleAttributes interface and it seems to have worked.

Apologies if this is all working as it should and I'm just missing something obvious!

@felixfbecker
Copy link
Collaborator

Yep, the docblocks are very outdated. The README and tests should be up to date though. Feel free to do a PR.

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

No branches or pull requests

2 participants