UNPKG

juniper

Version:

ESM JSON Schema builder for static Typescript inference.

46 lines 1.4 kB
import { AbstractSchema, type SchemaGenerics, type SchemaParams } from '../lib/schema.js'; import type { Nullable } from '../lib/types.js'; type AnyBooleanSchema = BooleanSchema<boolean>; /** * Schema for defining boolean type. * * @template N */ export declare class BooleanSchema<N extends boolean = false> extends AbstractSchema<SchemaGenerics<Nullable<boolean, N>>> { protected readonly schemaType = "boolean"; /** * Not enough possible states. */ anyOf: never; /** * Not enough possible states. */ allOf: never; /** * Not enough possible states. */ if: never; /** * Not enough possible states. */ oneOf: never; /** * Not enough possible states. */ not: never; nullable: (this: AnyBooleanSchema) => BooleanSchema<true>; /** * Create a new instance of BooleanSchema. * * @param [options] - optional * @param [options.title] - Add title to schema * @param [options.description] - Add description to schema * @param [options.deprecated] - flag schema as deprecated * @param [options.readOnly] - value should not be modified * @param [options.writeOnly] - value should be hidden * @returns new boolean schema */ static create(this: void, options?: SchemaParams<boolean>): BooleanSchema; } export {}; //# sourceMappingURL=boolean.d.ts.map