summaryrefslogtreecommitdiff
path: root/includes/external/addressbook/node_modules/cacheable-request/dist/index.d.ts
blob: 123a8e3abd1592a137ee4ad7582218a6d7e49131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { RequestFn, StorageAdapter, CacheResponse, CacheValue, CacheableOptions, Emitter } from './types.js';
type Func = (...args: any[]) => any;
declare class CacheableRequest {
    cache: StorageAdapter;
    cacheRequest: RequestFn;
    hooks: Map<string, Func>;
    constructor(cacheRequest: RequestFn, cacheAdapter?: StorageAdapter | string);
    request: () => (options: CacheableOptions, cb?: (response: CacheResponse) => void) => Emitter;
    addHook: (name: string, fn: Func) => void;
    removeHook: (name: string) => boolean;
    getHook: (name: string) => Func;
    runHook: (name: string, ...args: any[]) => Promise<CacheValue>;
}
export default CacheableRequest;
export * from './types.js';
export declare const onResponse = "onResponse";
//# sourceMappingURL=index.d.ts.map