ParsersEngineResults

ParsersEngineResults class API reference

A parsersEngineResults instance is returned by the parsers engine execution.

Example:

const results: ParsersEngineResults = SDTFClient.createParsersPipelines({ ... })()

Properties

all

This getter returns the raw results of the parser pipelines execution.

get all: Array<ParsersEngineResult>;

hasError

This getter returns a boolean indicating whether any of the pipelines returned an error.

get hasError: boolean;

hasWarning

This getter returns a boolean indicating whether any of the pipelines returned warnings.

get hasWarning: boolean;

allErrorMessages

This getter gathers the error messages from all the pipelines.

get allErrorMessages: ParsersEngineErrorMessage[];

allWarningMessages

This getter gathers the warning messages from all the pipelines.

get allWarningMessages: ParsersEngineWarningMessage[];

allInformationMessages

This getter gathers the information messages from all the pipelines.

get allInformationMessages: ParsersEngineInformationMessage[];

Methods

logErrorMessages

This method prints error messages to the console.

logErrorMessages(): void;

logWarningMessages

This method prints warning messages to the console.

logWarningMessages(): void;

logInformationMessages

This method prints information messages to the console.

logInformationMessages(): void;

debug

This method prints a summary of the execution results to the console.

debug(options?: {
    withOutputContent?: boolean;
}): void;

mapOutput

This method maps over any output of the parsers. It is quite convenient if you want to run some post-process on the output.

mapOutput(fn: (output: ParserOutput | null) => ParserOutput | null | void): this;

mapFiles

This method maps over output files. It is quite convenient if you want to run some post-process on the files.

mapFiles(fn: (file: FilesOutput['files'][number]) => FilesOutput['files'][number] | void): this;

writeToDisk

This method writes the outputs of the parsers to the file system.

writeToDisk(directoryPath?: string): Promise<{
    errors: Array<any>;
    outputPaths: Array<string>;
}>;

serialize

This method serializes the results before HTTP transmission.

serialize(): SerializedParsersEngineResults;

Last updated