-
Notifications
You must be signed in to change notification settings - Fork 207
/
Copy pathtypes.d.ts
35 lines (32 loc) · 964 Bytes
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
interface CacheOptions {
/**
* Consider the request method a GET regardless of its actual value.
*/
ignoreMethod?: boolean;
}
export interface Caches {
default: {
/**
* Adds to the cache a response keyed to the given request.
* Returns a promise that resolves to undefined once the cache stores the response.
*/
put(request: Request | string, response: Response): Promise<undefined>;
/**
* Returns a promise wrapping the response object keyed to that request.
*/
match(
request: Request | string,
options?: CacheOptions
): Promise<Response | undefined>;
/**
* Deletes the Response object from the cache and
* returns a Promise for a Boolean response
*/
delete(request: Request | string, options?: CacheOptions): Promise<boolean>;
};
}
// eslint-disable-next-line no-unused-vars
declare let caches: Caches;
declare global {
const NOTION_TOKEN: string | undefined;
}