Skip to content

Commit

Permalink
add another test case
Browse files Browse the repository at this point in the history
  • Loading branch information
lukpsaxo committed Apr 8, 2022
1 parent 25cdc41 commit 9f8ef29
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions typescript_test/test.ts
Expand Up @@ -676,6 +676,17 @@ function testOptionalArgumentsConflicting() {
selector7({} as State, 'blach')
// @ts-expect-error wrong type
selector7({} as State, 1)

const selector8 = createSelector(
(state: State, prefix: unknown) => prefix,
(str) => str
)

// @ts-expect-error needs a argument
selector8({} as State)
// allowed to pass anything as the type is unknown
selector8({} as State, 'blach')
selector8({} as State, 2)
}

function testDefaultMemoize() {
Expand Down

0 comments on commit 9f8ef29

Please sign in to comment.