frontend/.pnpm-store/v3/files/45/9c56524313cf4a2e0f45b3b34502e1ed13e54eb1e007d05a7faad6d7a43728032998efd09678e590c45000feeff4c434d99b0aba94edec05295b2467693ce9

19 lines
661 B
Plaintext

import { Converter } from "./Converter";
import P from "bluebird";
import { JSONResult } from "./lineToJson";
import { CSVParseParam } from "./Parameters";
import { ParseRuntime } from "./ParseRuntime";
export abstract class Processor {
protected params: CSVParseParam;
protected runtime: ParseRuntime;
constructor(protected converter: Converter) {
this.params = converter.parseParam;
this.runtime = converter.parseRuntime;
}
abstract process(chunk: Buffer,finalChunk?:boolean): P<ProcessLineResult[]>
abstract destroy():P<void>;
abstract flush(): P<ProcessLineResult[]>;
}
export type ProcessLineResult = string | string[] | JSONResult;