UNPKG

@capgo/cli

Version:
8 lines (7 loc) 315 B
/** * Run an async function with the process working directory temporarily set to `dir`. * * NOTE: `process.chdir()` is global, so this uses a simple in-process queue to avoid * concurrent calls interfering with each other. */ export declare function withCwd<T>(dir: string, fn: () => Promise<T>): Promise<T>;