UNPKG

transgate

Version:

Agent-based task flow framework

23 lines (22 loc) 714 B
import { GateItem, OutGate } from '../gate'; /** * Copying and item and sending all gates for Output */ export declare class Duplicator<T extends GateItem> { private _outGates; /** * @param {...Gate} outGates - destination gates */ constructor(...outGates: OutGate<T>[]); /** * @param {object} item - sending item * @return {Promise} - a promise that resolves when the item has been sended */ send(item: T | null): Promise<void>; } /** * Copying and item and sending all gates for Output * @param {...Gate} outGates - destination gates * @return {Duplicator} */ export declare function duplicator<T extends GateItem>(...outGates: OutGate<T>[]): Duplicator<T>;