import * as t from '../retype/retype'; /** * Spiffy is our utility for Schematized Persisted Files * Pretty simple: we use Retype to define a schema which parsed JSON is validated against */ export declare function spiffy(template: TSpfTemplate): TSpfFactory; type TDefaultFileLocation = { relativePath: string; relativeTo: 'USER_HOME' | 'REPO'; }; type TSpfMutator = (data: TSpfData) => void; type TSpfTemplate = { defaultLocations: TDefaultFileLocation[]; schema: t.Schema; initialize: () => unknown; options?: { removeIfEmpty?: boolean; removeIfInvalid?: boolean; }; }; type TSpfInstance = { readonly data: TSpfData; readonly update: (mutator: TSpfMutator) => void; readonly path: string; delete: () => void; }; type TSpfFactory = { load: (filePath?: string) => TSpfInstance; loadIfExists: (filePath?: string) => TSpfInstance | undefined; }; export {};