source: imaps-frontend/node_modules/undici-types/cache.d.ts

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 1.2 KB
Line 
1import type { RequestInfo, Response, Request } from './fetch'
2
3export interface CacheStorage {
4 match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>,
5 has (cacheName: string): Promise<boolean>,
6 open (cacheName: string): Promise<Cache>,
7 delete (cacheName: string): Promise<boolean>,
8 keys (): Promise<string[]>
9}
10
11declare const CacheStorage: {
12 prototype: CacheStorage
13 new(): CacheStorage
14}
15
16export interface Cache {
17 match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>,
18 matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>,
19 add (request: RequestInfo): Promise<undefined>,
20 addAll (requests: RequestInfo[]): Promise<undefined>,
21 put (request: RequestInfo, response: Response): Promise<undefined>,
22 delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>,
23 keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]>
24}
25
26export interface CacheQueryOptions {
27 ignoreSearch?: boolean,
28 ignoreMethod?: boolean,
29 ignoreVary?: boolean
30}
31
32export interface MultiCacheQueryOptions extends CacheQueryOptions {
33 cacheName?: string
34}
35
36export declare const caches: CacheStorage
Note: See TracBrowser for help on using the repository browser.