Skip to content

Commit

Permalink
export setGlobalDevModeChecks in index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Nov 30, 2023
1 parent 000e22c commit 2c389cf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type {
} from './createStructuredSelector'
export { defaultEqualityCheck, defaultMemoize } from './defaultMemoize'
export type { DefaultMemoizeOptions } from './defaultMemoize'
export { setGlobalDevModeChecks } from './devModeChecks/setGlobalDevModeChecks'
export type {
Combiner,
CreateSelectorOptions,
Expand Down
39 changes: 19 additions & 20 deletions typescript_test/argsMemoize.typetest.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import memoizeOne from 'memoize-one';
import microMemoize from 'micro-memoize';
import memoizeOne from 'memoize-one'
import microMemoize from 'micro-memoize'
import {
unstable_autotrackMemoize as autotrackMemoize,
createSelector,
createSelectorCreator,
defaultMemoize,
weakMapMemoize
} from 'reselect';
import { expectExactType } from './typesTestUtils';
} from 'reselect'
import { expectExactType } from './typesTestUtils'

interface RootState {
todos: {
Expand Down Expand Up @@ -686,22 +686,21 @@ function overrideMemoizeAndArgsMemoizeInCreateSelector() {
argsMemoizeOptions: [{ isPromise: false }] // This field causes a type error since it does not match the options param of `defaultMemoize`.
}
)
const selectorMicroMemoizePartiallyOverridden2 =
createSelectorMicroMemoize(
(state: RootState) => state.todos,
todos => todos.map(t => t.id),
{
// memoizeOptions: [
// {
// equalityCheck:
// // @ts-expect-error
// (a, b) => a === b,
// maxSize: 2
// }
// ],
argsMemoizeOptions: [{ isPromise: false }]
}
)
const selectorMicroMemoizePartiallyOverridden2 = createSelectorMicroMemoize(
(state: RootState) => state.todos,
todos => todos.map(t => t.id),
{
// memoizeOptions: [
// {
// equalityCheck:
// // @ts-expect-error
// (a, b) => a === b,
// maxSize: 2
// }
// ],
argsMemoizeOptions: [{ isPromise: false }]
}
)

const selectorDefaultParametric = createSelector(

Check failure on line 705 in typescript_test/argsMemoize.typetest.ts

View workflow job for this annotation

GitHub Actions / Test Types with TypeScript 4.9

No overload matches this call.

Check failure on line 705 in typescript_test/argsMemoize.typetest.ts

View workflow job for this annotation

GitHub Actions / Test Types with TypeScript 5.2

No overload matches this call.

Check failure on line 705 in typescript_test/argsMemoize.typetest.ts

View workflow job for this annotation

GitHub Actions / Test Types with TypeScript 5.0

No overload matches this call.

Check failure on line 705 in typescript_test/argsMemoize.typetest.ts

View workflow job for this annotation

GitHub Actions / Test Types with TypeScript 5.1

No overload matches this call.

Check failure on line 705 in typescript_test/argsMemoize.typetest.ts

View workflow job for this annotation

GitHub Actions / Test Types with TypeScript 4.7

No overload matches this call.

Check failure on line 705 in typescript_test/argsMemoize.typetest.ts

View workflow job for this annotation

GitHub Actions / Test Types with TypeScript 4.8

No overload matches this call.
(state: RootState, id: number) => id,
Expand Down

0 comments on commit 2c389cf

Please sign in to comment.