@obsidize/rx-map
Version:
ES6 Map with rxjs extensions for change detection
19 lines (18 loc) • 618 B
TypeScript
/**
* Alias for standard rxjs Unsubscribable entities.
* Re-defined here to keep this implementation as isolated as possible.
*/
export interface Unsubscribable {
unsubscribe(): void;
}
/**
* Simple subscription aggregator.
* This is needed to prevent unwarrented rxjs exceptions when attempting to mass-unsubscribe.
*/
export declare class Subsink implements Unsubscribable {
private readonly mSubscriptions;
static unsubscribeSafe(target: Unsubscribable): void;
add(...targets: Unsubscribable[]): this;
unsubscribe(): void;
addMany(targets: Unsubscribable[]): this;
}