Skip to content

Commit

Permalink
fix(typing): thanks DiverseSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiefChippy2 committed Nov 14, 2021
1 parent 05de959 commit 9b1f394
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,24 @@ export interface clientOptions {
cacheTime?: number;
cacheSize?: number;
cacheFilter?: string | string[] | { 'whitelist': string | string[], 'blacklist': string | string[] };
cacheHandler?: Record<string, Function>;
cacheHandler?: CacheHandler & unknown;
rateLimit?: 'HARD' | 'AUTO' | 'NONE';
keyLimit?: number;
syncWithHeaders?: boolean;
silent?: boolean;
headers?: Record<string, unknown>;
checkForUpdates?: boolean;
}
type PromiseLike <T> = T | Promise<T>;
type CacheHandler = {
set: (key: string, value: unknown) => PromiseLike<void>,
get: (key: string) => PromiseLike<unknown>,
has: (key: string) => PromiseLike<boolean>,
delete: (key: string) => PromiseLike<boolean>,
keys: () => PromiseLike<string[]>,
size: () => PromiseLike<number>,
clear: () => PromiseLike<void>,
};
export interface methodOptions {
noCacheCheck?: boolean;
noCaching?: boolean;
Expand Down

0 comments on commit 9b1f394

Please sign in to comment.