(key: string)
| 58 | } |
| 59 | |
| 60 | async remove(key: string) { |
| 61 | this.cache[key] = null; |
| 62 | return new Promise<void>((resolve) => chrome.storage.local.remove(key, () => { |
| 63 | if (chrome.runtime.lastError) { |
| 64 | console.error('Failed to delete DevTools data', chrome.runtime.lastError); |
| 65 | } |
| 66 | resolve(); |
| 67 | })); |
| 68 | } |
| 69 | |
| 70 | async has(key: string) { |
| 71 | return Boolean(await this.get(key)); |