Skip to content

Pass the argument index to the comparator function #3808

Open
@rosostolato

Description

@rosostolato

Which @ngrx/* package(s) are relevant/related to the feature request?

store

Information

I'm creating a custom createSelector function by using the createSelectorFactory but my custom logic requires me to know the index of the argument that I'm comparing. Is it possible to pass the index at this line?

https://github.com/ngrx/platform/blob/master/modules/store/src/selector.ts#L56

The type of argument comparator would be:

export type ComparatorFn = (a: any, b: any, index: number) => boolean;

Describe any alternatives/workarounds you're currently using

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

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