(
keyOrKeys: string | string[],
)
| 787 | async get<T>(key: string): Promise<T | undefined>; |
| 788 | async get<T>(keys: string[]): Promise<Map<string, T>>; |
| 789 | async get<T>( |
| 790 | keyOrKeys: string | string[], |
| 791 | ): Promise<T | undefined | Map<string, T>> { |
| 792 | if (Array.isArray(keyOrKeys)) { |
| 793 | const result = new Map<string, T>(); |
| 794 | for (const key of keyOrKeys) { |
| 795 | const value = this.data.get(key); |
| 796 | if (value !== undefined) result.set(key, value); |
| 797 | } |
| 798 | return result; |
| 799 | } |
| 800 | return this.data.get(keyOrKeys); |
| 801 | } |
| 802 | |
| 803 | async put(entries: Record<string, any>): Promise<void> { |
| 804 | for (const [key, value] of Object.entries(entries)) { |
no outgoing calls