# StreamOptions

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

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

Optional handlers that can be supplied when creating streams.

## Properties

- **`subscriptionAddedHandler`** (`(request: StreamSubscription) => void`, optional)
  Subscribes to the event which fires when a stream subscription is added.
- **`subscriptionRemovedHandler`** (`(request: StreamSubscription) => void`, optional)
  Subscribes to the event which fires when a stream subscription is removed.
- **`subscriptionRequestHandler`** (`(request: SubscriptionRequest) => void`, optional)
  Subscribes for subscription requests. These can be accepted, rejected or accepted on a custom branch.
  If this handler is attached, each request should be explicitly accepted.

## Related types

- [StreamSubscription](https://docs.interop.io/desktop/reference/javascript/interop/streamsubscription/index.md)
- [SubscriptionRequest](https://docs.interop.io/desktop/reference/javascript/interop/subscriptionrequest/index.md)
