(blockId: string, fn: Function)
| 80 | // we have to leave the lowest block Id in the registry |
| 81 | // unless that block has no children |
| 82 | addCleanupFn(blockId: string, fn: Function) { |
| 83 | let cleanupFunctions: Function[] = []; |
| 84 | if (this.cleanupFns.has(blockId)) { |
| 85 | cleanupFunctions = this.cleanupFns.get(blockId)!; |
| 86 | } |
| 87 | cleanupFunctions.push(fn); |
| 88 | this.cleanupFns.set(blockId, cleanupFunctions); |
| 89 | } |
| 90 | |
| 91 | invokeTriggerCleanupFns(blockId: string) { |
| 92 | const fns = this.cleanupFns.get(blockId) ?? []; |
no test coverage detected