(id: string)
| 21 | }); |
| 22 | } |
| 23 | async get(id: string): Promise<ActionSnapshot | undefined> { |
| 24 | const e = this.map.get(id); |
| 25 | if (!e) return undefined; |
| 26 | if (e.expiresAt !== undefined && Date.now() > e.expiresAt) { |
| 27 | this.map.delete(id); |
| 28 | return undefined; |
| 29 | } |
| 30 | return e.snap; |
| 31 | } |
| 32 | async delete(id: string): Promise<void> { |
| 33 | this.map.delete(id); |
| 34 | } |