UNPKG

@microsoft/windows-admin-center-sdk

Version:

Microsoft - Windows Admin Center Shell

29 lines (28 loc) 949 B
import { Subject, SubscriptionLike } from 'rxjs'; import { Disposable } from '../data/disposable'; /** * Helper class for managing rxjs objects that exist for the lifetime of their consumer. */ export declare class RxjsLifetimeManager implements Disposable { /** * Container for active subscriptions that should be cleaned up in the OnDestroy call. */ private subscriptions; /** * Container for active subscriptions that should be cleaned up in the OnDestroy call. */ private subjects; /** * Adds rxjs subscriptions to this lifetime manager */ addSubscriptions(...subscriptions: SubscriptionLike[]): void; /** * Adds subjects to this lifetime manager */ addSubjects(...subjects: Subject<any>[]): void; /** * Disposes this instance freeing any resources consumed by it. * Unsubscribes all subscriptions and completes all subjects. */ dispose(): void; }