Skip to content

Commit

Permalink
Make OutputSelector backwards compatible w/ < 4.1.0 version
Browse files Browse the repository at this point in the history
  • Loading branch information
eXamadeus committed Nov 2, 2021
1 parent 0dab037 commit f38a912
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ interface CreateSelectorFunction<
): OutputSelector<
Selectors,
Result,
GetParamsFromSelectors<Selectors>,
((...args: SelectorResultArray<Selectors>) => Result) &
ReturnType<MemoizeFunction>
ReturnType<MemoizeFunction>,
GetParamsFromSelectors<Selectors>
>

/** Input selectors as separate inline arguments with memoizeOptions passed */
Expand All @@ -183,9 +183,9 @@ interface CreateSelectorFunction<
): OutputSelector<
Selectors,
Result,
GetParamsFromSelectors<Selectors>,
((...args: SelectorResultArray<Selectors>) => Result) &
ReturnType<MemoizeFunction>
ReturnType<MemoizeFunction>,
GetParamsFromSelectors<Selectors>
>

/** Input selectors as a separate array */
Expand All @@ -196,9 +196,9 @@ interface CreateSelectorFunction<
): OutputSelector<
Selectors,
Result,
GetParamsFromSelectors<Selectors>,
((...args: SelectorResultArray<Selectors>) => Result) &
ReturnType<MemoizeFunction>
ReturnType<MemoizeFunction>,
GetParamsFromSelectors<Selectors>
>
}

Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ interface OutputSelectorFields<Combiner, Result> {
export type OutputSelector<
S extends SelectorArray,
Result,
Params extends readonly any[],
Combiner
Combiner,
Params extends readonly any[] = never
> = Selector<GetStateFromSelectors<S>, Result, Params> &
OutputSelectorFields<Combiner, Result>

Expand Down

0 comments on commit f38a912

Please sign in to comment.