/** * Open a file in the default browser (html-roadmap-view/AC-1, AC-5). * * One launcher per platform, always given an argument vector and never a shell string, so * a path cannot become a command. That rules out `cmd /c start` on Windows, which is a * shell; `explorer.exe ` hands the file to its default handler without one. * * Resolves as soon as the launcher has started or failed to. It never waits for the exit: * `xdg-open` can block until the browser it started is closed. * * @module */ /** The part of a child process this needs — what a test fake has to provide. */ export interface Launched { once(event: 'spawn', listener: () => void): unknown; once(event: 'error', listener: (err: Error) => void): unknown; unref(): void; } export type Spawn = (cmd: string, args: string[]) => Launched; export type OpenResult = { ok: true; } | { ok: false; error: string; }; export declare function launcherFor(platform: NodeJS.Platform, file: string): { cmd: string; args: string[]; }; export declare function openInBrowser(file: string, opts?: { platform?: NodeJS.Platform; spawn?: Spawn; }): Promise; //# sourceMappingURL=open-browser.d.ts.map