import { CompilationResult , TSchema , Validator } from "../../types" ; import { getValidatorFromSchema } from "./getValidatorFromSchema" ; export function vCompileSchema < T = any > ( schema ) { const explanations = [ ] ; const validator = getValidatorFromSchema ( schema , undefined ) as Validator < T > ; return Object . assign ( validator , { explanations } ) ; }