|
1 |
| -/* eslint-disable @typescript-eslint/no-empty-interface */ |
2 |
| -/* eslint-disable @typescript-eslint/no-unused-vars */ |
3 | 1 | // THIS FILE FOR MONACO EDITOR CODE COMPLETION
|
4 | 2 |
|
5 | 3 | declare interface FunctionContextResponse {
|
@@ -36,26 +34,34 @@ declare interface Context {
|
36 | 34 | readAsset: (path: string, options: any) => void
|
37 | 35 | }
|
38 | 36 |
|
| 37 | +declare interface IDb { |
| 38 | + get<T = any>(key: string): Promise<T> |
| 39 | + set(key: string, value: any): Promise<void> |
| 40 | + find<T = any>(condition: Record<string, any>): Promise<T[]> |
| 41 | + del(key: string): Promise<void> |
| 42 | + insert(key: string, value: any): Promise<void> |
| 43 | + update(key: string, value: any): Promise<void> |
| 44 | +} |
| 45 | + |
39 | 46 | declare interface IStorage {
|
40 |
| - db: any |
| 47 | + db: IDb |
41 | 48 | cache: {
|
42 | 49 | get(key: string): Promise<string>
|
43 | 50 | set(key: string, value: string | object): Promise<string>
|
44 |
| - dek(key: string): Promise<string> |
| 51 | + del(key: string): Promise<string> |
45 | 52 | }
|
| 53 | + dangerousAccessDbInstance: () => any |
46 | 54 | }
|
47 | 55 |
|
48 | 56 | declare const __dirname: string
|
49 | 57 | declare const __filename: ''
|
50 | 58 |
|
51 | 59 | declare class Buffer {
|
52 |
| - constructor(...args: any[]): Buffer |
| 60 | + constructor(...args: any[]) |
53 | 61 | from(...args: any[]): Buffer
|
54 | 62 | [x: string]: any
|
55 | 63 | }
|
56 | 64 |
|
57 |
| -declare const console: Console |
58 |
| - |
59 | 65 | declare const logger: Console
|
60 | 66 |
|
61 | 67 | declare const process: {
|
@@ -105,4 +111,5 @@ declare class UserModel {
|
105 | 111 |
|
106 | 112 | socialIds?: any
|
107 | 113 | }
|
| 114 | + |
108 | 115 | declare function require(id: string, useCache?: boolean): Promise<any>
|
0 commit comments