UNPKG

@jaenster/channels

Version:

simple concurrency channel messaging

14 lines (13 loc) 572 B
import { Channel } from "./channel"; import { EventTS } from "@jaenster/events"; declare function filter<T = any>(this: BaseClient<T>, [other, msg]: [BaseClient<T>, T]): any; declare const handler: unique symbol; export declare abstract class BaseClient<T> extends EventTS { [handler]: typeof filter; out: <S>(this: S, ...t: T[]) => S; constructor(eventQueue?: Channel<[BaseClient<T>, T]>); protected abstract in(data: T, client: BaseClient<T>): any; attach(eventQueue: Channel<[BaseClient<T>, T]>): void; detach(): void; } export {};