UNPKG

juniper

Version:

ESM JSON Schema builder for static Typescript inference.

54 lines 1.52 kB
import { AbstractSchema, type SchemaGenerics, type SchemaParams, type SerializationParams } from '../lib/schema.js'; import type { JsonSchema, SchemaType } from '../lib/types.js'; /** * Schema for defining a "never" schema. * * Usage should be carefully considered, as often there are alternatives that better * describe a schema. * * Convenient for some cases where "content" is impossible, like * an empty array `never[]`. */ export declare class NeverSchema extends AbstractSchema<SchemaGenerics<never>> { /** * Not applicable. */ allOf: never; /** * Not applicable. */ anyOf: never; /** * Not applicable. */ if: never; /** * Used internally */ not: never; /** * Not applicable. */ nullable: never; /** * Not applicable. */ oneOf: never; /** * Create a new instance of NullSchema. * * @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 impossible schema */ static create(this: void, options?: SchemaParams<never>): NeverSchema; /** * @override */ protected toSchema(params: SerializationParams): JsonSchema<SchemaType<this>>; } //# sourceMappingURL=never.d.ts.map