import { JSONFile, JSONFileType, JSONObject, JSONFileFields } from "./json"; import { MarkdownFileType, MarkdownFile, MarkdownTokens } from "./markdown"; import { PathFields } from "../path"; export declare type FileDefinition = { name?: string; type?: FileType; }; declare type FileType = JSONFileType | MarkdownFileType; export declare type File = PathFields & (T extends JSONObject ? JSONFileFields : FileFields); export declare type FileFields = { read: () => Promise; readSync: () => T | undefined; write: (content?: T) => Promise; writeSync: (content?: T) => void; }; export declare function defineFile(file: FileDefinition, parent?: string): File; export { JSONFile, JSONObject, MarkdownFile, MarkdownTokens };