Skip to content

Commit

Permalink
Use an actual type for the selector count checks
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Oct 26, 2021
1 parent 8ac54e5 commit b800e2f
Showing 1 changed file with 59 additions and 57 deletions.
116 changes: 59 additions & 57 deletions typescript_test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -994,68 +994,70 @@ function createSelectorConfigOptions() {
)
}

// Verify more than 12 selectors are accepted
// Issue #525
const withLotsOfInputSelectors = createSelector(
(_state: any) => 1,
(_state: any) => 2,
(_state: any) => 3,
(_state: any) => 4,
(_state: any) => 5,
(_state: any) => 6,
(_state: any) => 7,
(_state: any) => 8,
(_state: any) => 9,
(_state: any) => 10,
(_state: any) => 11,
(_state: any) => 12,
(_state: any) => 13,
(_state: any) => 14,
(_state: any) => 15,
(_state: any) => 16,
(_state: any) => 17,
(_state: any) => 18,
(_state: any) => 19,
(_state: any) => 20,
(_state: any) => 21,
(_state: any) => 22,
(_state: any) => 23,
(_state: any) => 24,
(_state: any) => 25,
(_state: any) => 26,
(_state: any) => 27,
(_state: any) => 28,
(_state: StateA) => 1,
(_state: StateA) => 2,
(_state: StateA) => 3,
(_state: StateA) => 4,
(_state: StateA) => 5,
(_state: StateA) => 6,
(_state: StateA) => 7,
(_state: StateA) => 8,
(_state: StateA) => 9,
(_state: StateA) => 10,
(_state: StateA) => 11,
(_state: StateA) => 12,
(_state: StateA) => 13,
(_state: StateA) => 14,
(_state: StateA) => 15,
(_state: StateA) => 16,
(_state: StateA) => 17,
(_state: StateA) => 18,
(_state: StateA) => 19,
(_state: StateA) => 20,
(_state: StateA) => 21,
(_state: StateA) => 22,
(_state: StateA) => 23,
(_state: StateA) => 24,
(_state: StateA) => 25,
(_state: StateA) => 26,
(_state: StateA) => 27,
(_state: StateA) => 28,
(...args) => args.length
)

type SelectorArray29 = [
(_state: any) => 1,
(_state: any) => 2,
(_state: any) => 3,
(_state: any) => 4,
(_state: any) => 5,
(_state: any) => 6,
(_state: any) => 7,
(_state: any) => 8,
(_state: any) => 9,
(_state: any) => 10,
(_state: any) => 11,
(_state: any) => 12,
(_state: any) => 13,
(_state: any) => 14,
(_state: any) => 15,
(_state: any) => 16,
(_state: any) => 17,
(_state: any) => 18,
(_state: any) => 19,
(_state: any) => 20,
(_state: any) => 21,
(_state: any) => 22,
(_state: any) => 23,
(_state: any) => 24,
(_state: any) => 25,
(_state: any) => 26,
(_state: any) => 27,
(_state: any) => 28,
(_state: any) => 29
(_state: StateA) => 1,
(_state: StateA) => 2,
(_state: StateA) => 3,
(_state: StateA) => 4,
(_state: StateA) => 5,
(_state: StateA) => 6,
(_state: StateA) => 7,
(_state: StateA) => 8,
(_state: StateA) => 9,
(_state: StateA) => 10,
(_state: StateA) => 11,
(_state: StateA) => 12,
(_state: StateA) => 13,
(_state: StateA) => 14,
(_state: StateA) => 15,
(_state: StateA) => 16,
(_state: StateA) => 17,
(_state: StateA) => 18,
(_state: StateA) => 19,
(_state: StateA) => 20,
(_state: StateA) => 21,
(_state: StateA) => 22,
(_state: StateA) => 23,
(_state: StateA) => 24,
(_state: StateA) => 25,
(_state: StateA) => 26,
(_state: StateA) => 27,
(_state: StateA) => 28,
(_state: StateA) => 29
]

type Results = SelectorResultArray<SelectorArray29>
Expand Down

0 comments on commit b800e2f

Please sign in to comment.