-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.d.ts
More file actions
38 lines (33 loc) · 798 Bytes
/
index.d.ts
File metadata and controls
38 lines (33 loc) · 798 Bytes
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
36
37
38
interface ThinkCacheCtx {
/**
* get cache
*
* @memberOf CacheExtend
*/
cache(name: string): Promise<any>;
/**
* get or set cache
* if value is null means delete cache
* if value is undefined, get cache by name
* else mean set cache
* @memberOf CacheExtend
*/
cache(name: string, value?: any, config?: object): Promise<any>;
/**
* get cache
*
* @memberOf CacheExtend
*/
cache(name: string, value: Function): Promise<any>;
}
declare module 'thinkjs' {
interface Think extends ThinkCacheCtx { }
interface Context extends ThinkCacheCtx { }
interface Controller extends ThinkCacheCtx { }
}
declare namespace ThinkCache {
const think: ThinkCacheCtx
const controller: ThinkCacheCtx
const context: ThinkCacheCtx
}
export = ThinkCache;