( type: TriggerType, lDetails: LDeferBlockDetails, cleanupFn: VoidFunction, )
| 19 | * or a regular trigger of a defer block. |
| 20 | */ |
| 21 | export function storeTriggerCleanupFn( |
| 22 | type: TriggerType, |
| 23 | lDetails: LDeferBlockDetails, |
| 24 | cleanupFn: VoidFunction, |
| 25 | ) { |
| 26 | const key = getCleanupFnKeyByType(type); |
| 27 | if (lDetails[key] === null) { |
| 28 | lDetails[key] = []; |
| 29 | } |
| 30 | (lDetails[key]! as VoidFunction[]).push(cleanupFn); |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Invokes registered cleanup functions either for prefetch or for regular triggers. |
no test coverage detected
searching dependent graphs…