Skip to content

Commit

Permalink
Minor TypeScript definition tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 7, 2019
1 parent 74a84f2 commit d88dab7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
declare namespace mem {
interface CacheStorage<KeyType extends unknown, ValueType extends unknown> {
interface CacheStorage<KeyType, ValueType> {
has(key: KeyType): boolean;
get(key: KeyType): ValueType | undefined;
set(key: KeyType, value: ValueType): void;
Expand All @@ -9,8 +9,8 @@ declare namespace mem {

interface Options<
ArgumentsType extends unknown[],
CacheKeyType extends unknown,
ReturnType extends unknown
CacheKeyType,
ReturnType
> {
/**
Milliseconds until the cache expires.
Expand Down Expand Up @@ -73,8 +73,8 @@ declare const mem: {
*/
<
ArgumentsType extends unknown[],
ReturnType extends unknown,
CacheKeyType extends unknown
ReturnType,
CacheKeyType
>(
fn: (...arguments: ArgumentsType) => ReturnType,
options?: mem.Options<ArgumentsType, CacheKeyType, ReturnType>
Expand All @@ -85,7 +85,7 @@ declare const mem: {
@param fn - Memoized function.
*/
clear<ArgumentsType extends unknown[], ReturnType extends unknown>(
clear<ArgumentsType extends unknown[], ReturnType>(
fn: (...arguments: ArgumentsType) => ReturnType
): void;
};
Expand Down

0 comments on commit d88dab7

Please sign in to comment.