Skip to content

Commit

Permalink
fix(useMemoize): change type for getKey
Browse files Browse the repository at this point in the history
  • Loading branch information
chaii3 committed Aug 10, 2022
1 parent 4230032 commit 88f87a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/useMemoize/index.test.ts
Expand Up @@ -159,7 +159,7 @@ describe('useMemoize', () => {

resolver.mockClear()
expect(memo(3)).toBe('result-1')
expect(memo(4)).toBe('result-2')
expect(memo('4')).toBe('result-2')
expect(resolver).not.toHaveBeenCalled()
})
})
Expand Down
2 changes: 1 addition & 1 deletion packages/core/useMemoize/index.ts
Expand Up @@ -77,7 +77,7 @@ export interface UseMemoizeReturn <Result, Args extends unknown[]> {
}

export interface UseMemoizeOptions<Result, Args extends unknown[]> {
getKey?: (...args: Args) => string
getKey?: (...args: Args) => string | number
cache?: UseMemoizeCache<CacheKey, Result>
}

Expand Down

0 comments on commit 88f87a6

Please sign in to comment.