import { IExplanation , schemaToExplanationSchema } from "../../explanations" ; import { KeyType , TSchema } from "../../types" ; const EMPTY_PATH = [ ] ; export function explanation ( value , path , schema , innerExplanations = [ ] ) { return { value , schema : schemaToExplanationSchema ( schema ) , path : EMPTY_PATH . concat ( path ) , innerExplanations } ; }