UNPKG

transgate

Version:

Agent-based task flow framework

18 lines (17 loc) 479 B
import { GateItem } from './type'; /** * Joint between two agents */ export declare class JointGate<T extends GateItem> { private _buffer; constructor(); /** * @return {Promise<object>} - a promise that resolves the item when buffer contains or sended */ receive(): Promise<T | null>; /** * @param {object} item - sending item * @return {Promise} - a promise that resolves immediately */ send(item: T | null): Promise<void>; }