Skip to content

Commit

Permalink
Remove ParametricSelector and OutputParametricSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Nov 15, 2023
1 parent bdf43e5 commit 0112f1a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 29 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,10 @@ const selectCompletedTodosLength = createSelector(

These updates aim to enhance flexibility, performance, and developer experience. For detailed usage and examples, refer to the updated documentation sections for each feature.

- **Breaking Changes**:

- Removed `ParametricSelector` and `OutputParametricSelector` types. Their functionalities are now integrated into `Selector` and `OutputSelector` respectively, which inherently support additional parameters.

</details>

<div align="right">[ <a href="#table-of-contents">↑ Back to top ↑</a> ]</div>
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ export type {
GetParamsFromSelectors,
GetStateFromSelectors,
MemoizeOptionsFromParameters,
OutputParametricSelector,
OutputSelector,
OutputSelectorFields,
OverrideMemoizeOptions,
ParametricSelector,
Selector,
SelectorArray,
SelectorResultArray,
Expand Down
27 changes: 0 additions & 27 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ export type OutputSelectorFields<

/**
* The memoized version of {@linkcode OutputSelectorFields.resultFunc resultFunc}.
*
*/
memoizedResultFunc: Combiner<InputSelectors, Result> &
ExtractMemoizerFields<MemoizeFunction>
Expand All @@ -216,13 +215,11 @@ export type OutputSelectorFields<

/**
* Counts the number of times {@linkcode OutputSelectorFields.memoizedResultFunc memoizedResultFunc} has been recalculated.
*
*/
recomputations: () => number

/**
* Resets the count of {@linkcode OutputSelectorFields.recomputations recomputations} count to 0.
*
*/
resetRecomputations: () => 0

Expand Down Expand Up @@ -298,30 +295,6 @@ export type Combiner<InputSelectors extends SelectorArray, Result> = Distribute<
(...resultFuncArgs: SelectorResultArray<InputSelectors>) => Result
>

/**
* A selector that is assumed to have one additional argument, such as
* the props from a React component.
*
* @public
*/
export type ParametricSelector<State, Props, Result> = Selector<
State,
Result,
[Props, ...any]
>

/**
* A generated selector that is assumed to have one additional argument.
*
* @public
*/
export type OutputParametricSelector<State, Props, Result> = ParametricSelector<
State,
Props,
Result
> &
OutputSelectorFields<SelectorArray, Result>

/**
* A standard function returning true if two values are considered equal.
*
Expand Down

0 comments on commit 0112f1a

Please sign in to comment.