# StreamSubscription

**Kind**: interface | **Module**: [Interop](https://docs.interop.io/desktop/reference/javascript/interop/index.md)

**Source**: https://docs.interop.io/desktop/reference/javascript/interop/streamsubscription/index.html

An object describing a subscription to an Interop stream.

## Properties

- **`arguments`** (`any`, required)
  Arguments used when the subscription was made.
- **`branchKey`** (`string`, required)
  The key of the stream branch to which the subscription was made.
- **`instance`** (`Instance`, required)
  Instance of the subscriber.
- **`stream`** (`Stream`, required)
  The stream to which the subscription was made.

## Methods

### close

Closes the subscription. This will not close the stream.

```ts
() => void
```

**Returns**: `void`

### push

Pushes data to this subscription only.

```ts
(data: object) => void
```

**Parameters**

- **`data`** (`object`, required)
  Data to push.

**Returns**: `void`

## Related types

- [Instance](https://docs.interop.io/desktop/reference/javascript/interop/instance/index.md)
- [Stream](https://docs.interop.io/desktop/reference/javascript/interop/stream/index.md)
