UNPKG

juniper

Version:

ESM JSON Schema builder for static Typescript inference.

104 lines 2.12 kB
import { AbstractSchema, type SchemaGenerics } from '../lib/schema.js'; import type { JsonSchema, SchemaType } from '../lib/types.js'; /** * "Schema" for importing your own custom JSON Schema document. * * __Any schema or typing is not validated__ * * Useful for times when a schema document is controlled elsewhere, or gradual * adoption of Juniper. * * Provided schema is returned as a shallow clone. * * @template T */ export declare class CustomSchema<T> extends AbstractSchema<SchemaGenerics<T>> { #private; /** * Not applicable. */ title: never; /** * Not applicable. */ allOf: never; /** * Not applicable. */ anyOf: never; /** * Not applicable. */ description: never; /** * Not applicable. */ default: never; /** * Not applicable. */ deprecated: never; /** * Not applicable. */ example: never; /** * Not applicable. */ examples: never; /** * Not applicable. */ readOnly: never; /** * Not applicable. */ writeOnly: never; /** * Not applicable. */ if: never; /** * Not applicable. */ metadata: never; /** * Not applicable. */ not: never; /** * Not applicable. */ nullable: never; /** * Not applicable. */ oneOf: never; /** * Not applicable. */ ref: never; /** * @override */ constructor(options?: Record<string, unknown>); /** * Create a new instance of CustomSchema. * * @param [schema] - raw JSON Schema * @returns new custom schema */ static create<T>(this: void, schema?: Record<string, unknown>): CustomSchema<T>; /** * Takes no options, as schema is defined internally. * * @param this - this instance * @returns serializable JSON Schema */ toJSON(this: this): JsonSchema<SchemaType<this>>; /** * @override */ protected toSchema(): JsonSchema<SchemaType<this>>; } //# sourceMappingURL=custom.d.ts.map