fake-service-worker
Version:
Fake service worker implementation for testing developer edge applications
24 lines (23 loc) • 812 B
TypeScript
declare type MultiCacheQueryOptions = {
ignoreMethod?: boolean | undefined;
ignoreSearch?: boolean | undefined;
ignoreVary?: boolean | undefined;
cacheName?: string;
};
export declare class EdgeCacheStorage implements CacheStorage {
/** Default global cache */
default: Cache;
private caches;
constructor();
/** Delete a custom cache */
delete(cacheName: string): Promise<boolean>;
/** Check a cache exists */
has(cacheName: string): Promise<boolean>;
/** Returns array of cache names */
keys(): Promise<string[]>;
/** Checks for a match in all caches.*/
match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
/** Create a cache with cachename */
open(cacheName: string): Promise<Cache>;
}
export {};