UNPKG

@nativescript/core

Version:

A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.

28 lines (27 loc) 1.01 kB
import { Observable } from '../data/observable'; /** * Manages internal framework global state */ export declare class NativeScriptGlobalState { events: Observable; launched: boolean; appEventWiring: Array<any>; private _appInstanceReady; private _setLaunched; constructor(); get appInstanceReady(): boolean; set appInstanceReady(value: boolean); /** * Ability for classes to initialize app event handling early even before the app instance is ready during boot cycle avoiding boot race conditions * @param callback wire up any global event handling inside the callback */ addEventWiring(callback: () => void): void; private _setLaunchedFn; } export declare function getNativeScriptGlobals(): { events: { [Key in keyof import("../data/observable").Observable]: import("../data/observable").Observable[Key]; }; launched: boolean; appEventWiring: Array<any>; appInstanceReady: boolean; addEventWiring(callback: () => void): void; };