Refactor the application module to prevent cyclic dependencies, which were:

* common requires application
* application requires common
* application requires application
Make the exports typed using @hdeshev way.
This commit is contained in:
atanasovg
2016-01-14 13:43:35 +02:00
parent d916d76b30
commit 935939bb51
4 changed files with 110 additions and 83 deletions

View File

@ -118,8 +118,9 @@ declare module "application" {
/**
* Loads css file and parses to a css syntax tree.
* @param cssFile Optional parameter to point to an arbitrary css file. If not specified, the cssFile property is used.
*/
export function loadCss(): void;
export function loadCss(cssFile?: string): Array<cssSelector.CssSelector>;
/**
* Call this method to start the application. Important: All code after this method call will not be executed!
@ -330,6 +331,11 @@ declare module "application" {
*/
packageName: string;
/**
* True if the application is not running (suspended), false otherwise.
*/
paused: boolean;
/**
* This method is called by the JavaScript Bridge when navigation to a new activity is triggered.
* @param intent - Native (android) intent used to create the activity.