@beenotung/tslib
Version:
utils library in Typescript
15 lines (14 loc) • 548 B
TypeScript
import { ReadLine, ReadLineOptions } from 'readline';
export declare function createRL(options?: ReadLineOptions): ReadLine;
export declare const getRL: () => ReadLine;
export declare namespace IO {
/**
* @description lineNum start from 0
* */
function forEachLine(onnext: (line: string, lineNum: number) => void, oncomplete?: () => void): void;
/**
* @description lineNum start from 0
* */
function mapLine<A>(f: (line: string, lineNum: number) => A): Promise<A[]>;
function collect(): Promise<string[]>;
}