( context: C, hooks: FetchHook<C> | FetchHook<C>[] | undefined )
| 138 | } |
| 139 | |
| 140 | export async function callHooks<C extends FetchContext = FetchContext>( |
| 141 | context: C, |
| 142 | hooks: FetchHook<C> | FetchHook<C>[] | undefined |
| 143 | ): Promise<void> { |
| 144 | if (hooks) { |
| 145 | if (Array.isArray(hooks)) { |
| 146 | for (const hook of hooks) { |
| 147 | await hook(context); |
| 148 | } |
| 149 | } else { |
| 150 | await hooks(context); |
| 151 | } |
| 152 | } |
| 153 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…