UNPKG

docschema

Version:

Schema declaration and validation library using JsDoc comments

21 lines (20 loc) 710 B
/** * Use this function just below a JsDoc comment. * The comment must contain either: * - A single \@enum tag. * - One or more \@param tags, each of them describing * one property of an object. * * @template T * @param {T} [typeCarrier] * @returns {DocSchema<T>} */ export function docSchema<T>(typeCarrier?: T): DocSchema<T>; export default docSchema; import { DocSchema } from './DocSchema.js'; import { DocSchemaParser } from './DocSchemaParser.js'; import { DocSchemaValidator } from './DocSchemaValidator.js'; /** @type {any} */ export const type: any; import { ValidationError } from './errors/ValidationError.js'; export { DocSchema, DocSchemaParser, DocSchemaValidator, ValidationError };