Skip to content

Commit

Permalink
Remove ParametricSelector and OutputParametricSelector from type …
Browse files Browse the repository at this point in the history
…tests.
  • Loading branch information
aryaemami59 committed Nov 15, 2023
1 parent 0112f1a commit 9f7c288
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions typescript_test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { TypedUseSelectorHook } from 'react-redux'
import { useSelector } from 'react-redux'
import type {
GetStateFromSelectors,
ParametricSelector,
Selector,
SelectorResultArray,
TypedStructuredSelectorCreator
} from 'reselect'
Expand Down Expand Up @@ -142,7 +142,7 @@ function testSelectorAsCombiner() {
type Component<P> = (props: P) => any

declare function connect<S, P, R>(
selector: ParametricSelector<S, P, R>
selector: Selector<S, R, [P]>
): (component: Component<P & R>) => Component<P>

function testConnect() {
Expand Down Expand Up @@ -830,14 +830,14 @@ function testTypedCreateStructuredSelector() {
const selectBar = (state: RootState) => state.bar

const typedStructuredSelectorCreator: TypedStructuredSelectorCreator<RootState> =
createStructuredSelector as TypedStructuredSelectorCreator<RootState>
createStructuredSelector

typedStructuredSelectorCreator({
foo: selectFoo,
bar: selectBar
})

// @ts-expect-error
// @ts-expect-error Because `bar` is missing.
typedStructuredSelectorCreator({
foo: selectFoo
})
Expand Down

0 comments on commit 9f7c288

Please sign in to comment.