transgate
Version:
Agent-based task flow framework
23 lines (22 loc) • 621 B
TypeScript
import { OutGate, GateItem } from './type';
/**
* Write file Gate for Input/Output
*/
export declare class WriteFileGate<T extends GateItem> implements OutGate<T> {
private path;
/**
* @param {string} path - file path
*/
constructor(path: string);
/**
* @param {object} item - written item
* @return {Promise} - a promise that resolves when the item has been written
*/
send(item: T | null): Promise<void>;
/**
* Convert item to string
* @param {object} item - sended item
* @return {string} written to stdout
*/
_stringify(data: T): string;
}