Skip to content

new createSelector API and typing #651

Open

Description

@rgazelot

Hello, I'm trying to type my application which is using redux-orm. I came across an issue with the new createSelector API. My code is as simple as:

import { createSelector } from 'redux-orm'
import orm from 'features/regulation/orm'

export const selectTest = createSelector(orm.Policy)

The error I get is that

Expected 2-9 arguments, but got 1.ts(2554)
redux.d.ts(87, 51): An argument for 'ormSelector' was not provided.

I'm using @types/redux-orm": "^0.16.0. As far as I know from the createSelector definition, it expects at least 2 arguments.

Are the types not up-to-date with the library or I miss something? Do you guys have any work-around?

Activity

  1. JDruery commented on Jun 5, 2021

    @JDruery

    Any word on a solution for this? I tried prefacing the selector with // @ts-ignore, but then it gives me a runtime type error: cannot read property Policy of undefined.

    The lack of up-to-date documentation makes me wonder if this project is being abandoned. That would be very sad, as it's a fantastic library.

  2. sheikharfaz commented on Apr 17, 2025

    @sheikharfaz

    @haveyaseen Can you assign this issue to me? Let me try fixing this.

  3. Nishant1195 commented on Jul 24, 2026

    @Nishant1195

    I would like to solve this issue? Can you assign it to me?

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions