(hookName: string)
| 433 | } |
| 434 | |
| 435 | const usePluginsCtx = (hookName: string): ExecutorPluginsContextValue => { |
| 436 | const ctx = useContext(ExecutorPluginsContext); |
| 437 | if (!ctx) { |
| 438 | // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- boundary: React hook invariant |
| 439 | throw new Error(`${hookName} must be called inside an <ExecutorPluginsProvider>.`); |
| 440 | } |
| 441 | return ctx; |
| 442 | }; |
| 443 | |
| 444 | /** Full list of loaded `ClientPluginSpec` values. */ |
| 445 | export const useClientPlugins = (): readonly ClientPluginSpec[] => |
no outgoing calls
no test coverage detected