import { FxError } from "@microsoft/teamsfx-api"; import { Result } from "neverthrow"; export type TempDirectoryPhase = "allocate" | "operate" | "cleanup"; export interface TempDirectoryPort { create(prefix: string): Promise; remove(directory: string): Promise; } /** Run one operation in a disposable directory without allowing filesystem failures to escape Result. */ export declare function withTempDirectory(prefix: string, errorFactory: (phase: TempDirectoryPhase, error: unknown) => FxError, operation: (directory: string) => Promise>, port?: TempDirectoryPort): Promise>; //# sourceMappingURL=withTempDirectory.d.ts.map