(key: string, defaultValue?: T)
| 413 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
| 414 | items = new Map<string, any>() |
| 415 | public get<T>(key: string, defaultValue?: T): T | undefined { |
| 416 | if (this.items.has(key)) { |
| 417 | return <T>this.items.get(key) || defaultValue; |
| 418 | } else { |
| 419 | return defaultValue; |
| 420 | } |
| 421 | } |
| 422 | // eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any |
| 423 | public async update(key: string, value: any): Promise<void> { |
| 424 | this.items.set(key, value); |
no test coverage detected