Installation
npm install --save @types/json-schema-compare
Summary
This package contains type definitions for json-schema-compare (https://github.com/mokkabonna/json-schema-compare#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-schema-compare.
import { JSONSchema4, JSONSchema6, JSONSchema6Definition, JSONSchema7, JSONSchema7Definition } from "json-schema";
export = compare;
type JSONSchemaComparee = JSONSchema4 | JSONSchema6Definition | JSONSchema7Definition | undefined;
type KnownKeys<T> = {
[K in keyof T]: string extends K ? never : K;
} extends { [_ in keyof T]: infer U } ? U : never;
type JSONSchemaKeys =
| KnownKeys<JSONSchema4>
| keyof JSONSchema6
| keyof JSONSchema7
| string & { ""?: never | undefined };
interface Options {
ignore?: JSONSchemaKeys[] | undefined;
}
declare function compare(a: JSONSchemaComparee, b: JSONSchemaComparee, options?: Options): boolean;
Additional Details
Credits
These definitions were written by Emily Marigold Klassen.