UNPKG

@freemework/common

Version:

Common library of the Freemework Project.

18 lines (17 loc) 950 B
import { FException } from "../exception/index.js"; import { FExecutionContext } from "../execution_context/index.js"; import { FChannelSubscriber } from "./FChannelSubscriber.js"; export declare class FChannelSubscriberMixin<TData, TEvent extends FChannelSubscriber.Event<TData> = FChannelSubscriber.Event<TData>> implements FChannelSubscriber<TData, TEvent> { private __callbacks?; private __broken?; static applyMixin(targetClass: any): void; addHandler(cb: FChannelSubscriber.Callback<TData, TEvent>): void; removeHandler(cb: FChannelSubscriber.Callback<TData, TEvent>): void; protected get isBroken(): boolean; protected verifyBrokenChannel(): void; protected notify(executionContext: FExecutionContext, event: TEvent | FException): void | Promise<void>; protected get hasSubscribers(): boolean; protected onAddFirstHandler(): void; protected onRemoveLastHandler(): void; private constructor(); }