///
///
///
import { promises } from 'fs';
import { Readable, Writable } from 'stream';
export declare const FILE_ENCODING = "utf-8";
export type Filesystem = Pick;
export interface Source {
data: string;
/**
* Path from which this source was loaded.
*/
path: string;
}
export interface Document {
/**
* Document data.
*/
data: unknown;
/**
* Original source.
*/
source: Source;
}
export interface Element {
/**
* Element data.
*/
data: unknown;
/**
* Containing document, *not* the immediate parent.
*/
document: Document;
/**
* Position within a set of selected elements.
*/
index: number;
}
/**
* Hook for tests to override the fs fns.
*/
export declare function setFs(fs: Filesystem): () => void;
export declare function resetFs(): void;
export declare function listFiles(path: string): Promise>;
export declare function readSource(path: string, stream?: Readable): Promise;
export declare function readStream(stream: Readable, encoding: BufferEncoding): Promise;
export declare function writeSource(path: string, data: string, stream?: Writable): Promise;
export declare function writeStream(stream: Writable, data: string): Promise;
//# sourceMappingURL=source.d.ts.map