import { type App } from 'electron'; import { type IntoEntries, type MapValueToObservable } from '@cycle-mega-driver/common/lib'; import { type Observable } from 'rxjs'; import { type Stream } from 'xstream'; declare type PathName = Parameters[0]; interface AppLifecycleAction { state: 'default' | 'quit' | 'exit'; isQuittingEnabled: boolean; exitCode: number; setPath: { name: PathName; path: string; }; } export declare type AppLifecycleSink = IntoEntries; export declare class AppLifecycleSource { /** * You should do almost everything after this. */ readonly ready$: Observable; /** * Maybe a good time to quit app. */ windowAllClosed$: Observable; /** * Time to do something, your app is going to quit! */ beforeQuit$: Observable; /** * Your app is quitting, do some resources disposition. */ willQuit$: Observable; /** * App will quit right now with the code. */ quit$: Observable<{ exitCode: number; }>; /** * Used to being piped by other sinks like ipc and browser. */ whenReady: (observable: Observable) => Observable; untilReady: (observable: Observable) => Observable; paths: Record>; private innerPaths; createSink(input: MapValueToObservable>): Observable; constructor(sink$: Observable); private setupPath; private setPath; } export declare function makeAppLifecyleDriver(): (xs$: Stream) => AppLifecycleSource; export {};