import { StructError } from "superstruct"; import { ParsingError } from "tokenizr"; import { AdifRecord } from "./adif/adifRecord"; export declare enum Command { Station = "station", Operator = "operator", Call = "call", Date = "date", Freq = "freq", Mode = "mode", TimeOn = "timeOn", RstSent = "rst_sent", RstRcvd = "rst_rcvd", NewLine = "newline", EOF = "EOF", Sota = "sota", MySota = "mysota", Wwff = "wwff", MyWwff = "mywwff", Pota = "pota", MyPota = "mypota", GridSquare = "gridsquare", MyGridSquare = "myGridsquare", TxPwr = "txPwr", Field = "field" } export interface ParserFailure { line: string; error: ParsingError; } export interface ValidationFailure { error: StructError; line: string; } export interface ParseSuccess { contact: AdifRecord; } export type ParseResult = ParseSuccess | ParserFailure | ValidationFailure; export declare function parse(input: string): Array; export declare function collectGlobalErrors(results: ParseResult[]): string[]; export declare function validationMessagesForResult(result: ParseResult): string[];