import { Pathy } from '@bscotch/pathy'; import { ZodSchema, ZodTypeDef } from 'zod'; import { type DeletedAsset, type Asset, type AudioAsset } from './assetSource.types.js'; /** * Compute the type of a record that results from diffing * the keys of two records (the keys that are only in the `Left` record). */ export type DiffByKeys = { [Key in keyof Left as Key extends keyof Right ? never : Key]: Left[Key]; }; /** * Vue-style props definitions, with prop names as keys mapping to * functions that return the prop value. */ export type Props = { [Key in keyof T]: (arg: S) => T[Key] | Promise; }; export interface AssetSourceFileOptions { /** * Path to the file, such that the instance cwd is the * directory containing the config. */ path: Pathy; metaSchema: ZodSchema; props: Props, this>; meta?: T | DeletedAsset; } export declare class AssetSourceFile { protected options: AssetSourceFileOptions; constructor(options: AssetSourceFileOptions); get path(): Pathy; isDeleted(): Promise; /** * If the file does not exist, returns `undefined`. Else * returns its checksum. */ computeChecksum(): Promise; refresh(): Promise; toJSON(): T | DeletedAsset; } export declare class AssetSourceFileAudio extends AssetSourceFile { constructor(path: Pathy, meta?: AudioAsset | DeletedAsset); static from(path: Pathy, meta: AudioAsset | DeletedAsset): AssetSourceFileAudio; } //# sourceMappingURL=AssetSourceFile.d.ts.map