* Build a map of {hookType: count} from matched hooks.
(hooks: MatchedHook[])
| 1564 | * Build a map of {hookType: count} from matched hooks. |
| 1565 | */ |
| 1566 | function getHookTypeCounts(hooks: MatchedHook[]): Record<string, number> { |
| 1567 | const counts: Record<string, number> = {} |
| 1568 | for (const h of hooks) { |
| 1569 | counts[h.hook.type] = (counts[h.hook.type] || 0) + 1 |
| 1570 | } |
| 1571 | return counts |
| 1572 | } |
| 1573 | |
| 1574 | function getHooksConfig( |
| 1575 | appState: AppState | undefined, |
no outgoing calls
no test coverage detected