Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions site/src/content/apidocs/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -1441,10 +1441,42 @@ virtual filesystem.
- **`name`** — `string`

The command name as invoked.
- **`signal`** — `AbortSignal`

Execution-scoped cancellation signal.

Aborted on `bash.cancel()`, caller `signal` abort, and execution timeout.
Pass to `fetch` (or use `ctx.fetch`) so hanging I/O aborts promptly.
- **`stdin`** — `null | string`

Piped input, or `null` if there is no pipe.

### `fetch`

```typescript
fetch(input: any, init?: any): Promise<Response>
```

Cancellation-aware fetch: combines `signal` with `init.signal`
so either source aborts the request.

### `onCancel`

```typescript
onCancel(handler: () => void): () => void
```

Run `handler` on cancellation. Returns an unsubscribe function.
The handler fires at most once per invocation.

### `throwIfCancelled`

```typescript
throwIfCancelled(): void
```

Throw an `AbortError` when `signal` is aborted.

## CapabilityFingerprint

The environment that produced a commit.
Expand Down
Loading