mirror of
https://github.com/stablyai/orca.git
synced 2026-10-08 00:02:38 +00:00
21 lines
756 B
TypeScript
21 lines
756 B
TypeScript
export type WindowsDesktopStartupServices = {
|
|
firstWindowReady: Promise<void>
|
|
localPtyReady: Promise<void>
|
|
localPtyProviderReady: Promise<void>
|
|
}
|
|
|
|
type WindowsDesktopShellPathStartupOptions<TWindow> = {
|
|
bindServices: (services: Promise<WindowsDesktopStartupServices>) => void
|
|
openWindow: () => TWindow
|
|
shellPathReady: Promise<void>
|
|
startServices: () => WindowsDesktopStartupServices
|
|
}
|
|
|
|
export function startWindowsDesktopBeforeShellPathReady<TWindow>(
|
|
options: WindowsDesktopShellPathStartupOptions<TWindow>
|
|
): { window: TWindow; services: Promise<WindowsDesktopStartupServices> } {
|
|
const services = options.shellPathReady.then(options.startServices)
|
|
options.bindServices(services)
|
|
return { window: options.openWindow(), services }
|
|
}
|