/// /// import fs from 'fs'; import { Readable, Writable } from 'stream'; import { LogLevel, Logger } from '../Logger'; import { Result, ResultPromise } from '../models/Result'; export type ContentFile = readonly [content: string, path: string]; export type StreamFile = readonly [stream: Readable, path: string]; export declare function readFile(file: string): ResultPromise; export declare function writeFile(path: string): (content: string) => Promise | import("../models/Result").ResultErr>; export declare function createWriteStream(path: string): import("../models/Result").ResultErr | import("../models/Result").ResultOk; export declare function pipeStream(readable: Pick): (writable: Writable) => Writable; export declare function writeStream(file: StreamFile): Promise | import("../models/Result").ResultOk>; export declare function parseJSON(content: string): Result; export declare function pass(t: T): T; export declare function failIfEmpty(error: E): (t: T[]) => Result; export declare function map(fn: (t: T) => B): (t: T[]) => B[]; export declare function mapAsync(fn: (t: T) => B | Promise): (t: T[]) => Promise<(Awaited | Awaited)[]>; export declare function filter(fn: (t: T) => boolean): (t: T[]) => T[]; export declare function filterAsync(fn: (t: T) => boolean | Promise): (t: T[]) => Promise; export declare function log(logger: Logger, level: LogLevel): (message: string | ((t: T) => string)) => (t: T) => T; export declare function inspect(fn: (t: T) => unknown): (t: T) => T; export declare function not(value: boolean): boolean;