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