///
import * as fs from "fs";
type Data = string | Buffer | Uint8Array;
interface CommonOptions {
newline?: boolean | undefined;
overwrite?: boolean | undefined;
increment?: boolean | undefined;
}
type Options =
& Omit
& Omit
& CommonOptions;
type CreateWriteStreamOptions = Extract[1], Record>;
type StreamOptions =
& Omit
& Omit
& CommonOptions;
interface Result {
path: string;
data: T;
}
type Callback = (err: Error | null, result?: Result) => any;
declare function write(filepath: string, data: T, options: Options, callback: Callback): void;
declare function write(filepath: string, data: T, callback: Callback): void;
declare function write(filepath: string, data: T, options?: Options): Promise>;
declare namespace write {
function sync(filepath: string, data: T, options?: Options): Result;
function stream(filepath: string, options?: StreamOptions): fs.WriteStream;
}
export = write;