export declare function inTempDir(block: () => T | Promise): Promise; export type DownloadFailure = 'no_such_package'; export type NpmDownloadResult = { success: true; result: T; } | { success: false; reason: DownloadFailure; }; export declare function showDownloadFailure(f: DownloadFailure): "NPM package does not exist" | undefined; export declare function downloadNpmPackage(pkg: string, block: (dir: string) => Promise): Promise>; export declare function flatMap(xs: T[], fn: (x: T) => U[]): U[]; /** * Don't recurse infinitely by guarding a block with `do()`. */ export declare class RecursionBreaker { private readonly elements; do(key: A, block: () => void): void; } //# sourceMappingURL=util.d.ts.map