---
title: StreamOptionsInput
description: How a stream should behave.
---

How a stream should behave.

## Properties

### errorOnGap?

```ts
optional errorOnGap?: boolean;
```

Turns a gap into a rejection instead of an event. What a caller that must have
complete output wants.

***

### idleTimeout?

```ts
optional idleTimeout?: number;
```

How long the body may be silent before the connection is treated as dead.

***

### maxReconnects?

```ts
optional maxReconnects?: number;
```

How many reconnects before giving up. A bound rather than forever, because a stream
that drops every time is a condition a caller needs reported.

***

### offset?

```ts
optional offset?: number;
```

The byte to start at. Non-zero resumes a stream a previous process was reading.

#### Default Value

```ts
0
```

***

### reconnect?

```ts
optional reconnect?: boolean;
```

Whether to reconnect after a cut. `false` ends the stream at the cut instead, which
is what a caller doing its own reconnection wants.

## Provenance

This page is generated from `bindings/microvms-js/index.d.ts` by TypeDoc 0.28.20 and typedoc-plugin-markdown 4.13.1, run from `site/scripts/gen-reference.mjs` on every `pnpm run sync`, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding's Rust source, then regenerate the declarations with `mise run dts`. `mise run dts:check` fails when the committed file no longer matches the source.