(key: string)
| 9 | const entries = new Map<string, Map<string, Entry>>() |
| 10 | |
| 11 | const remove = (key: string) => { |
| 12 | const state = entries.get(key) |
| 13 | if (!state) return |
| 14 | for (const entry of state.values()) entry.dispose() |
| 15 | entries.delete(key) |
| 16 | } |
| 17 | |
| 18 | return { |
| 19 | ensure<T>(key: string, name: string, init: () => T) { |