export type ExecFileForGit = (file: string, args: string[], opts?: { cwd?: string; }) => Promise<{ stdout: string; stderr: string; }>; export type RepoRootMode = 'show-toplevel' | 'git-common-dir'; export interface ResolveRepoRootOptions { cwd?: string; mode?: RepoRootMode; execFile?: ExecFileForGit; } export type ExecFileSyncForGit = (file: string, args: string[], options: { cwd: string; encoding: 'utf8'; stdio: ['ignore', 'pipe', 'ignore']; }) => string; export interface ResolveRepoRootSyncOptions { cwd?: string; mode?: RepoRootMode; fallback?: string; execFileSync?: ExecFileSyncForGit; } export declare function resolveRepoRoot(options?: ResolveRepoRootOptions): Promise; export declare function resolveRepoRootSync(options?: ResolveRepoRootSyncOptions): string;