@apidevtools/json-schema-ref-parser
Version:
Parse, Resolve, and Dereference JSON Schema $ref pointers
14 lines (13 loc) • 533 B
TypeScript
import type $Refs from "./refs.js";
import type { ParserOptions } from "./options.js";
import type { JSONSchema } from "./types/index.js";
interface ParseTarget {
url: string;
reference?: string;
baseUrl?: string;
}
/**
* Reads and parses the specified file path or URL.
*/
declare function parse<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(target: string | ParseTarget, $refs: $Refs<S, O>, options: O): Promise<string | S | Buffer<ArrayBufferLike> | undefined>;
export default parse;