@jirutka/ajv-cli
Version:
CLI for Ajv JSON Schema Validator with human-friendly error messages
12 lines (11 loc) • 529 B
TypeScript
import type { Location, LocationRange } from '../types.js';
export type { Location, LocationRange };
export interface ParsedFile {
readonly data: any;
readonly lines: readonly string[];
readonly filename: string;
locate: (path: readonly string[]) => LocationRange | undefined;
}
type FileType = 'json' | 'jsonc' | 'yaml';
export declare function parseFile(filepath: string, fileType?: FileType): Promise<any>;
export declare function parseFileWithMeta(filepath: string, fileType?: FileType): Promise<ParsedFile>;