UNPKG

696 BTypeScriptView Raw
1/// <reference types="node" />
2/// <reference types="bluebird" />
3import { Converter } from "./Converter";
4import P from "bluebird";
5import { JSONResult } from "./lineToJson";
6import { CSVParseParam } from "./Parameters";
7import { ParseRuntime } from "./ParseRuntime";
8export declare abstract class Processor {
9 protected converter: Converter;
10 protected params: CSVParseParam;
11 protected runtime: ParseRuntime;
12 constructor(converter: Converter);
13 abstract process(chunk: Buffer, finalChunk?: boolean): P<ProcessLineResult[]>;
14 abstract destroy(): P<void>;
15 abstract flush(): P<ProcessLineResult[]>;
16}
17export declare type ProcessLineResult = string | string[] | JSONResult;