json-schema-describes-subset
Version:
Tools for static JSON schema analysis, including functions to determine if one schema describes a subset of another or if a schema describes the empty set or to convert a schema to its disjunctive normal form (DNF).
17 lines (16 loc) • 712 B
TypeScript
import { type LogicLiteral } from '../atomic-schema/index.js';
import { InstancesByConstructor } from '../utils/instances-by-constructor/index.js';
import { type JSONSchemaType } from '../json-schema-type/index.js';
type LogicLiteralsByConstructor = {
atomicSchemasByConstructor: InstancesByConstructor;
negatedAtomicSchemasByConstructor: InstancesByConstructor;
types: JSONSchemaType[];
booleanSchema?: undefined;
} | {
atomicSchemasByConstructor?: undefined;
negatedAtomicSchemasByConstructor?: undefined;
types?: undefined;
booleanSchema: boolean;
};
export declare function groupLogicLiteralConjuncts(literals: readonly LogicLiteral[]): LogicLiteralsByConstructor;
export {};