transgate
Version:
Agent-based task flow framework
18 lines (17 loc) • 504 B
TypeScript
import { ReadLineStreamGate } from './readline_stream';
/**
* Read file Gate for Input
*/
export declare class ReadFileGate<T> extends ReadLineStreamGate<T> {
constructor(path: string);
/**
* @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;
}