export declare function captureEnv(keys: string[]): { restore(): void; }; export declare function createPathResolutionEnv(homeDir: string, env?: Record): NodeJS.ProcessEnv; export declare function withPathResolutionEnv(homeDir: string, env: Record, fn: (resolvedEnv: NodeJS.ProcessEnv) => T): T; export declare function captureFullEnv(): { restore(): void; }; export declare function withEnv(env: Record, fn: () => T): T; export declare function withEnvAsync(env: Record, fn: () => Promise): Promise;