transgate
Version:
Agent-based task flow framework
19 lines (18 loc) • 537 B
TypeScript
import { ReadLineStreamGate } from './readline_stream';
import { GateItem } from './type';
/**
* Stdin Gate for Input
*/
export declare class StdinGate<T extends GateItem> extends ReadLineStreamGate<T> {
constructor();
/**
* @return {Promise<object>} - A promise that resolves the item when recevied
*/
receive(): Promise<T | null>;
/**
* Convert string to item
* @param {string} data - a line from stdin
* @return {object} item returned to the receiver
*/
_parse(data: string): T;
}