Skip to content

sequelize.query typings are not allowing model property in typings (v5) #10506

Closed

Description

@katanacrimson

What are you doing?

sequelize.query(/* my query here */, {
  type: QueryTypes.SELECT,
  model: ResolvedTag,
  transaction: tx
})

What do you expect to happen?

Should permit specifying the model that should be returned (populated) for rows selected.

What is actually happening?

error TS2345: Argument of type '{ type: QueryTypes; model: typeof ResolvedTag; transaction: Transaction; }' is not assignable to parameter of type 'QueryOptions \| QueryOptionsWithType \| u ndefined'.

Dialect: mysql
Dialect version: 1.6.5
Database version: mariadb:10.2 - 907f5f6c749d
Sequelize version: 5.0.0-beta.16
Tested with latest release: Yes

Activity

  1. SimonSchick commented on Mar 6, 2019

    @SimonSchick
    Contributor

    Can you please provide a full example?

  2. SimonSchick commented on Mar 6, 2019

    @SimonSchick
    Contributor

    @sushantdhiman can we add a TypeScript tag for this kind of stuff?

  3. added
    typescript
    on Mar 7, 2019
  4. sushantdhiman commented on Mar 7, 2019

    @sushantdhiman
    Contributor

    There is a "typings" label for this sort of stuff @SimonSchick

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