Sha256: 0d7278e89964e4a15eb97c9ad95d6af49dfd56d5acef426adb7777a029864d80
Contents?: true
Size: 788 Bytes
Versions: 33
Compression:
Stored size: 788 Bytes
Contents
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
Version data entries
33 entries across 33 versions & 1 rubygems