Skip to content

BelongsToManyGetAssociationsMixinOptions incomplete #12782

Closed

Description

@fabrykowski

Issue Description

What are you doing?

I am trying to query in TypeScript models linked via belongsToMany with conditions to the through model.

Here is the link to the SSCCE for this issue: sequelize/sequelize-sscce#123

What do you expect to happen?

The code to compile.

What is actually happening?

The compilation fails

src/sscce.ts:161:5 - error TS2345: Argument of type '{ through: { where: { isManager: boolean; }; }; }' is not assignable to parameter of type 'BelongsToManyGetAssociationsMixinOptions'.
  Object literal may only specify known properties, and 'through' does not exist in type 'BelongsToManyGetAssociationsMixinOptions'.

Additional context

n.a.

Environment

  • Sequelize version: 5.22.3 in SSCCE; 6.3.5 locally
  • Node.js version: v14.13.0
  • Operating System: OS X
  • TypeScript version: 4.0.3

Issue Template Checklist

How does this problem relate to dialects?

  • I think this problem happens regardless of the dialect.
  • I think this problem happens only for the following dialect(s):
  • I don't know, I was using PUT-YOUR-DIALECT-HERE, with connector library version XXX and database version XXX

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I don't know how to start, I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • No, I don't have the time and I wouldn't even know how to start.

Activity

  1. github-actions commented on Oct 28, 2021

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

  2. fabrykowski commented on Oct 28, 2021

    @fabrykowski
    Author

    This is still an issue

  3. github-actions commented on Nov 6, 2021

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has been open for 7 days without activity. It will be closed if no further activity occurs. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

  4. fabrykowski commented on Nov 8, 2021

    @fabrykowski
    Author

    Still an issue

  5. github-actions commented on Nov 24, 2021

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has been open for 14 days without activity. It will be closed if no further activity occurs within the next 14 days. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

  6. fabrykowski commented on Nov 24, 2021

    @fabrykowski
    Author

    Bump

  7. added
    typescript
    and removed on Nov 24, 2021
  8. WikiRik commented on Nov 24, 2021

    @WikiRik
    Member

    Hi, sorry about needing to bump a few times. We have done some edits to this since 6.3.5. Does this still occur on the latest release? (6.11.0 at the time of writing)

  9. ephys commented on Apr 16, 2022

    @ephys
    Member

    Fixed in #14280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    typescript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions