(hookName: string)
| 451 | } |
| 452 | |
| 453 | const usePluginsCtx = (hookName: string): ExecutorPluginsContextValue => { |
| 454 | const ctx = useContext(ExecutorPluginsContext); |
| 455 | if (!ctx) { |
| 456 | // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- boundary: React hook invariant |
| 457 | throw new Error(`${hookName} must be called inside an <ExecutorPluginsProvider>.`); |
| 458 | } |
| 459 | return ctx; |
| 460 | }; |
| 461 | |
| 462 | /** Full list of loaded `ClientPluginSpec` values. */ |
| 463 | export const useClientPlugins = (): readonly ClientPluginSpec[] => |
no outgoing calls
no test coverage detected