Skip to content

Commit

Permalink
Revert "Fix defaultMemoize for typescript 2.4 strict generic check"
Browse files Browse the repository at this point in the history
This reverts commit 5ec2b1f.
  • Loading branch information
Sean Lynch committed Aug 15, 2017
1 parent 5ec2b1f commit 7dad148
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -953,8 +953,8 @@ export function createSelector<S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12
): OutputParametricSelector<S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8 & S9 & S10 & S11 & S12, P1 & P2 & P3 & P4 & P5 & P6 & P7 & P8 & P9 & P10 & P11 & P12, T, (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10, res11: R11, res12: R12) => T>;


export function defaultMemoize<F extends Function, T>(
func: F, equalityCheck?: (a: T, b: T, index: number) => boolean,
export function defaultMemoize<F extends Function>(
func: F, equalityCheck?: <T>(a: T, b: T, index: number) => boolean,
): F;

export function createSelectorCreator(
Expand Down
2 changes: 0 additions & 2 deletions typescript_test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,6 @@ function testCreateSelectorCreator() {
// typings:expect-error
createSelectorCreator(defaultMemoize, 1);

createSelectorCreator(defaultMemoize, (a: number, b: number) => a === b);

createSelectorCreator(defaultMemoize, <T>(a: T, b: T, index: number) => {
if (index === 0)
return a === b;
Expand Down
5 changes: 3 additions & 2 deletions typescript_test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"strict": true
"noImplicitAny": true,
"strictNullChecks": true
}
}
}

0 comments on commit 7dad148

Please sign in to comment.