Last active
September 24, 2016 17:43
-
-
Save homam/acc88353734f73a4e678843cfe8427c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* @flow */ | |
declare class CacheOptions { | |
ignoreSearch: ?bool; | |
ignoreMethod: ?bool; | |
ignoreVary: ?bool; | |
cacheName: ?bool; | |
} | |
declare interface Cache { | |
add(url: string): Promise<void>; | |
addAll(urls: [Request | string]): Promise<void>; | |
delete(request: Request | string, options?: CacheOptions): Promise<bool>; | |
keys(): Promise<[Request]>; | |
match(request: Request | string, options?: CacheOptions): Promise<Response>; | |
matchAll(request: Request | String, options?: CacheOptions): Promise<[Request]>; | |
put(request: Request | string): Promise<void>; | |
} | |
declare interface Caches { | |
delete(key: string): Promise<bool>; | |
has(key: string): Promise<bool>; | |
keys(): Promise<[string]>; | |
match(request: Request | String, options?: CacheOptions): Promise<Response>; | |
open(cacheName: string): Promise<Cache>; | |
} | |
declare var caches: Caches |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment