UNPKG

677 BPlain TextView Raw
1import { ParserField } from "./parserField";
2
3/**
4 * A result of a successfully parsed data string.
5 */
6export interface ParserResult {
7 /**
8 * The result object as a serialized JSON string.
9 */
10 readonly jsonString: string;
11 /**
12 * The fields contained in the result as an array of [[ParserField]] objects.
13 * The order of the fields in array depends on the order of the fields in the input data.
14 */
15 readonly fields: ParserField[];
16 /**
17 * The fields contained in the result as a map of [[ParserField]] objects.
18 * The entries in the map are field names pointing to the parser field.
19 */
20 readonly fieldsByName: { [fieldName: string]: ParserField };
21}