UNPKG

571 BTypeScriptView Raw
1/// <reference types="node" />
2import { ReadLine } from 'readline';
3export declare type LineHandler = (line: string, index: number) => Promise<any>;
4export interface Stats {
5 length: number;
6 times: number[];
7 timeAverage: number;
8}
9export interface State {
10 buffer: string[];
11 isOpen: boolean;
12 stats: Stats;
13 reader: ReadLine;
14 resolve: Function;
15 reject: Function;
16 lineHandler: LineHandler;
17 index: number;
18}
19declare const _default: (lineHandler: LineHandler, input?: NodeJS.ReadableStream) => Promise<void>;
20export default _default;