1import { SpawnOptions, SpawnPromise } from '@expo/spawn-async'; 2/** 3 * The pending spawn promise is similar to the spawn promise from `@expo/spawn-async`. 4 * Instead of the `child` process being available immediately, the `child` is behind another promise. 5 * We need this to perform async tasks before running the actual spawn promise. 6 * Use it like: `await manager.installAsync().child` 7 */ 8export interface PendingSpawnPromise<T> extends Promise<T> { 9 /** 10 * The child process from the delayed spawn. 11 * This is `null` whenever the promise before the spawn promise is rejected. 12 */ 13 child: Promise<SpawnPromise<T>['child'] | null>; 14} 15export declare function createPendingSpawnAsync<V, T>(actionAsync: () => Promise<V>, spawnAsync: (result: V) => SpawnPromise<T>): PendingSpawnPromise<T>; 16/** 17 * Spawn a command with sudo privileges. 18 * On windows, this uses the `sudo-prompt` package. 19 * on other systems, this uses the `sudo` binary. 20 */ 21export declare function spawnSudoAsync(command: string[], spawnOptions: SpawnOptions): Promise<void>; 22