/** * Created by user on 2018/4/11/011. */ import Bluebird from 'bluebird'; import { IPipe } from 'stream-pipe'; import { ReadStream } from 'stream-pipe/fs'; export type IOptions = { mapper?(data: string): any; onpipe?(src: any): any; onclose?(...argv: any[]): any; onfinish?(...argv: any[]): any; onready?(...argv: any[]): any; ondata?(...argv: any[]): any; }; export declare function byLine(fn?: any, options?: IOptions): IStreamLine; export declare function createStreamLine(file: string, options: IOptions): IStreamLine; export declare function createStreamLine(file: string, fn?: (data: string) => any, options?: IOptions): IStreamLine; export declare function readFileLine(file: string, options: IOptions): IPromiseStream; export declare function readFileLine(file: string, fn?: (data: string) => any, options?: IOptions): IPromiseStream; export declare function wrapStreamToPromise(stream: T): IPromiseStream; export type IStreamLine = IPipe; export type IStreamLineWithValue = IStreamLine & { value?: T; }; export type IPromiseStream = Bluebird & { stream: T; }; declare const _default: typeof import("./line"); export default _default;