---
lang: en
title: 'API docs: context.subscription'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.subscription.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [Subscription](./context.subscription.md)

## Subscription interface

Subscription of context events. It's modeled after https://github.com/tc39/proposal-observable.

**Signature:**

```typescript
export interface Subscription 
```

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[closed](./context.subscription.closed.md)


</td><td>


</td><td>

boolean


</td><td>

Is the subscription closed?


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[unsubscribe()](./context.subscription.unsubscribe.md)


</td><td>

unsubscribe


</td></tr>
</tbody></table>


