import { JSONSchema4 } from '@typescript-eslint/utils/json-schema' /** * Checks whether a value matches a JSON schema. * * ESLint validates rule options against the rule JSON schema, but it does not * validate plugin settings and does not expose its validator. This function * lets settings be validated against the same schemas without a validation * library. * * Only the keywords used by the plugin schemas are supported: `type` (`array`, * `boolean`, `number`, `object` and `string`), `enum` for strings, `oneOf`, * `items`, `properties`, `required`, `additionalProperties: false`, * `minProperties` and `minimum`. Other keywords are ignored. As in ESLint, * `required` and `properties` treat a property set to `undefined` as missing. * * @example * * ```ts * matchesJsonSchema('asc', { enum: ['asc', 'desc'], type: 'string' }) * // Returns: true * * matchesJsonSchema('ascending', { enum: ['asc', 'desc'], type: 'string' }) * // Returns: false * ``` * * @param value - The value to check. * @param schema - The JSON schema to check the value against. * @returns True if the value matches the schema, false otherwise. */ export declare function matchesJsonSchema( value: unknown, schema: JSONSchema4, ): boolean