///
import { Readable, Transform } from 'stream';
export declare function releaseAfterUseAsync(fn: () => Promise, cleanup?: () => any): Promise;
export declare function prettifyAsyncErrors(fn: () => Promise, update: (message: string) => string): Promise;
export declare function prettifySyncErrors(fn: () => T, update: (message: string) => string): T;
export declare function bufferStream(stream: Readable): Promise;
export declare class BufferStream extends Transform {
private readonly chunks;
_transform(chunk: Buffer, encoding: string, cb: any): void;
_flush(cb: any): void;
}
export declare class DefaultStream extends Transform {
private readonly ifEmpty;
active: boolean;
constructor(ifEmpty?: Buffer);
_transform(chunk: Buffer, encoding: string, cb: any): void;
_flush(cb: any): void;
}
export declare function dynamicRequire(path: string): any;
export declare function sortMap(values: Iterable, mappers: ((value: T) => string) | Array<(value: T) => string>): T[];