(type: TriggerType, lDetails: LDeferBlockDetails)
| 34 | * Invokes registered cleanup functions either for prefetch or for regular triggers. |
| 35 | */ |
| 36 | export function invokeTriggerCleanupFns(type: TriggerType, lDetails: LDeferBlockDetails) { |
| 37 | const key = getCleanupFnKeyByType(type); |
| 38 | const cleanupFns = lDetails[key] as VoidFunction[]; |
| 39 | if (cleanupFns !== null) { |
| 40 | for (const cleanupFn of cleanupFns) { |
| 41 | cleanupFn(); |
| 42 | } |
| 43 | lDetails[key] = null; |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Invokes registered cleanup functions for prefetch, hydrate, and regular triggers. |
no test coverage detected
searching dependent graphs…