export declare function isUrl(url: string): boolean; export type Result = { ok: true; value: T; } | { ok: false; error: E; }; export type AnnotationKind = "Violation" | // The value violates a SHOULD "Warning" | // Some other info that could be interesting to the implementer "Note" | // The annotated value complies with the standard "Correct"; export type Annotation = { kind: AnnotationKind; id?: string; text: string; reference?: Reference; }; export type Reference = { url: string; quote?: string; }; export declare function isAnnotation(value: unknown): value is Annotation; type JsonPrimitive = number | string | boolean | null; export declare function isString(value: unknown): value is string; export declare function isNumber(value: unknown): value is number; export declare function isBoolean(value: unknown): value is boolean; export declare function isPrimitive(value: unknown): value is JsonPrimitive; export type JsonValue = JsonPrimitive | { [key: string]: JsonValue; } | JsonValue[]; export declare function isJsonObject(value: unknown): value is { [key: string]: JsonValue; }; export declare function isJsonArray(value: unknown): value is JsonValue[]; export type JsonPath = JsonPathElement[]; type JsonPathElement = string | number; export declare function getPath(data: JsonValue, path: JsonPath): Result; export type AnnotatedJson = T | T[] | { annotations: T[]; object: { [key: string]: AnnotatedJson; }; } | { annotations: T[]; array: AnnotatedJson[]; }; export declare function isAnnotatedObject(value: unknown): value is { annotations: Annotation[]; object: { [key: string]: AnnotatedJson; }; }; export declare function isAnnotatedArray(value: unknown): value is { annotations: Annotation[]; array: AnnotatedJson[]; }; export declare function mergeAnnotatedJson(a: AnnotatedJson, b: AnnotatedJson, path?: JsonPath): Result, string>; export declare function foldAnnotatedJson(f: (_acc: T, _annotation: Annotation) => T, acc: T, data: AnnotatedJson): T; export declare function fromJsonValue(value: JsonValue): AnnotatedJson; export declare function annotateAt(annotated: AnnotatedJson, path: JsonPath, annotation: Annotation): Result, string>; export declare class AnnotatedWrapper { value: AnnotatedJson; constructor(); merge(annotated: AnnotatedJson): void; assert(json: JsonValue, path: JsonPath, predicate: (v: JsonValue) => boolean, annotation: Annotation): void; assertString(json: JsonValue, path: JsonPath, annotation: Annotation): void; assertBoolean(json: JsonValue, path: JsonPath, annotation: Annotation): void; annotateAt(path: JsonPath, annotation: Annotation): void; } type Test = { value: JsonValue; result: AnnotatedJson; }; export type Rule = { name: string; validate: (self: { [key: string]: JsonValue; }) => AnnotatedJson; tests: Test[]; }; export {}; //# sourceMappingURL=types.d.ts.map