UNPKG

narraleaf

Version:

Create your visual novel with Electron and React

62 lines (61 loc) 1.97 kB
import { App } from "../../../main/electron/app/app"; import { PlatformInfo } from "../../../utils/pure/os"; import { StoreProvider } from "../../../main/electron/app/save/storeProvider"; export interface BaseAppConfig { forceSandbox: boolean; devTools: boolean; store?: StoreProvider; recoveryCreationInterval: number; } export interface IWindowsConfig { /** * Application icon path relative to the project root * * should be a path to a .ico file */ appIcon?: string; } export interface ILinuxConfig { /** * Application icon path relative to the project root * * should be a path to a .png file */ appIcon?: string; } export interface IMacConfig { /** * Application icon path relative to the project root * * should be a path to a .icns file */ appIcon?: string; } type PlatformConfigMap = { [MainPlatform.Windows]: IWindowsConfig; [MainPlatform.Linux]: ILinuxConfig; [MainPlatform.Mac]: IMacConfig; }; export declare enum MainPlatform { Windows = "windows", Linux = "linux", Mac = "mac" } export declare class AppConfig { static readonly DefaultBaseConfig: BaseAppConfig; static readonly DefaultWindowsConfig: IWindowsConfig; static readonly DefaultLinuxConfig: ILinuxConfig; static readonly DefaultMacConfig: IMacConfig; static Platform: typeof MainPlatform; baseConfig: BaseAppConfig; platformConfigs: PlatformConfigMap; constructor(baseConfig?: Partial<BaseAppConfig>); configure(platform: MainPlatform, config: Partial<PlatformConfigMap[MainPlatform]>): this; configWindows(config: Partial<IWindowsConfig>): this; configLinux(config: Partial<ILinuxConfig>): this; configMac(config: Partial<IMacConfig>): this; create(): App; getMainPlatform(platform: PlatformInfo): MainPlatform; getConfig(platform: PlatformInfo): BaseAppConfig & PlatformConfigMap[MainPlatform]; } export {};