/// /** * Generic parsing interface. All different parsing implementations (csv, json, etc.) should implement this interface */ export interface IParser { /** * * @param readableStream readable stream to parse * @param options options used for parsing by underlying parser implementation */ parse(readableStream: NodeJS.ReadableStream, options?: TParseOptions): Promise; } /** * Abstract class implementation of the IParser interface. All different parsing implementations should extend this class */ export declare abstract class AbstractParser implements IParser { protected readonly $$schema: TSchema; protected constructor(schema: TSchema); abstract parse(readableStream: NodeJS.ReadableStream, options?: TParseOptions): Promise; /** * * @param data data to be built after parsing. Includes validation according to schema, transformation of values, etc. */ abstract buildData(data: TParserResult[]): Promise; }