UNPKG

ng-sub

Version:

Ng-Sub is a lightweight tool used to manage rxjs subscriptions and prevent memory leakage.

13 lines (12 loc) 412 B
import { Subject, Subscription } from 'rxjs'; export declare class NgSub extends Subject<void> { private d$; private subscription; /** * A class that extends Subject and provides a way to manage subscriptions. * It allows adding multiple subscriptions and unsubscribing from all of them at once. */ constructor(); unsubscribe(): void; add(...subs: Subscription[]): void; }