import { Interval } from 'ohm-js/index'; import { RailID, Source } from '../result'; export declare const META_PATH = "_meta"; export type Attrs = Attr[]; export type FieldType = 'scalar' | 'set'; type FieldOptionals = { desc?: string; displayFn?: displayFn; }; type displayFn = (v: V) => string; declare abstract class AbstractField { readonly name: string; readonly path: string; readonly desc?: string; readonly displayFn?: displayFn; abstract readonly type: FieldType; constructor(name: string, path: string, optionals?: FieldOptionals); value(value: V, desc?: string): ValueDef; is(other: AbstractField): boolean; find(attrs: Attr[]): Attr | undefined; findAll(attrs: Attr[]): Attrs; } export declare class Field extends AbstractField { type: FieldType; } export declare class SetField extends AbstractField { type: FieldType; } export declare class ValueDef { readonly field: Field; readonly value: V; readonly desc?: string; readonly footnotes: string[]; constructor(field: Field, value: V, desc?: string, footnotes?: string[]); notes(...footnotes: string[]): ValueDef; at(...intervals: Interval[]): Attr; atSource(...source: Source[]): Attr; absent(): Attr; matches(o: RailID): boolean; compare(other: ValueDef): boolean; displayValue(): string; } export declare class Attr { readonly def: ValueDef; readonly source: Source; readonly footnotes: string[]; constructor(def: ValueDef, source: Source, footnotes: string[]); compare(other: Attr): boolean; } export {}; //# sourceMappingURL=index.d.ts.map