spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / telemetry / tests / fixtures / gate / failing-next.ts
14 lines · 443 BRaw
1/**
2 * A continuation as the gate's catch is handed it after a failure: going
3 * on throws what beneath refused with.
4 *
5 * @param isCalled whether the failed hook had called next before it failed
6 * @returns the continuation
7 */
8export const failingNext = (isCalled: boolean) =>
9 Object.assign(
10 () => {
11 throw new Error('beneath refused the entry')
12 },
13 { called: isCalled, error: { kind: 'throw' as const, budget: 0 } },
14 )