/** * Startup provides Startup */ import { CompleteStartupData } from "./types"; /** * Provides functionality related to startup of client side APIs. This runs as a singleton * and should always be accessed through the static method Startup.getInstance(). Never * construct a Startup class using new. */ export declare class Startup { static instance: Startup | null; isReady: boolean; onReadyListeners: (() => void)[]; /** * Contains the StartupData. Default is an anonymous app. */ currentStartupData: CompleteStartupData; /** * Use this method to gain access to the Startup singleton. Never construct * a Startup class using new. * @returns Singleton instance of Startup */ static getInstance(): Startup; /** * Returns the startup data that was set for this app. This data is generally * set in FSBL (FSBLDesktop, FSBLFreestanding, etc) and then it is cached here to * enable synchronous retrieval. * * Calls to System.updateOptions() or fin.Window.getCurrent().updateOptions() or finsembleWindow.updateOptions() * will not update this startup data! * */ getStartupData(): CompleteStartupData; /** * Sets the startup data. This is typically done by FSBL (FSBLDesktop or FSBLFreestanding) * but is also called by System.Window.getCurrent().updateOptions. */ setStartupData(newStartupData: CompleteStartupData): void; /** * Will trigger the listener when Finsemble's startup routine is ready. At this point it is safe * to use any Finsemble APIs. This guarantees: * a) startup data is available * b) router is ready to receive messages * c) Client APIs have been initialized * * Either pass in a callback function or await on the returned promise * * @param {() => void} [listener] Optional callback (or use await) */ onReady(listener?: () => void): Promise; /** * This is called by "friend" modules (FSBLDesktop, FSBLService, FSBLFreestanding) when they are ready * for the client side API to start. This will trigger the Startup.onReady() event for any app that is * listening for that event. * @private */ setReady(): void; } //# sourceMappingURL=Startup.d.ts.map