@foal/core
Version:
Full-featured Node.js framework, with no complexity
18 lines (17 loc) • 615 B
TypeScript
import Ajv from 'ajv';
export declare const _instanceWrapper: {
instance: undefined | Ajv;
};
/**
* Return the Ajv instance used internally by FoalTS validation hooks.
*
* It has this default configuration:
* - coerceTypes: true (Change data type of data to match `type` keyword.)
* - removeAdditional: true (Remove additional properties when `additionalProperties` keyword is false.)
* - useDefaults: true (Replace missing properties and items with the values from corresponding `default` keyword)
*
*
* @export
* @returns {Ajv} The AJV instance
*/
export declare function getAjvInstance(): Ajv;