mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fixing type errors in tests
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
require("globals");
|
||||
import definition = require("application");
|
||||
import observable = require("data/observable");
|
||||
import * as definition from "application";
|
||||
import * as observable from "data/observable";
|
||||
// TODO: Raise event on("livesync") and attach this handler in the ui/frame module.
|
||||
import { NavigationEntry, reloadPage } from "ui/frame";
|
||||
import { RuleSet } from "ui/styling/css-selector";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import appModule = require("./application-common");
|
||||
import definition = require("application");
|
||||
import frame = require("ui/frame");
|
||||
import observable = require("data/observable");
|
||||
import * as appModule from "./application-common";
|
||||
import * as definition from "application";
|
||||
import * as frame from "ui/frame";
|
||||
import * as observable from "data/observable";
|
||||
import * as typesModule from "utils/types";
|
||||
|
||||
global.moduleMerge(appModule, exports);
|
||||
@@ -337,5 +337,5 @@ global.__onUncaughtError = function (error: definition.NativeScriptError) {
|
||||
typedExports.onUncaughtError(error);
|
||||
}
|
||||
|
||||
typedExports.notify({ eventName: typedExports.uncaughtErrorEvent, object: appModule.android, android: error });
|
||||
typedExports.notify({ eventName: typedExports.uncaughtErrorEvent, object: appModule.android, android: error, error });
|
||||
};
|
||||
|
||||
@@ -95,6 +95,15 @@ declare module "application" {
|
||||
*/
|
||||
newValue: "portrait" | "landscape" | "unknown";
|
||||
}
|
||||
|
||||
/**
|
||||
* Event data containing information about unhandled application errors.
|
||||
*/
|
||||
export interface UnhandledErrorEventData extends ApplicationEventData {
|
||||
ios?: NativeScriptError;
|
||||
android?: NativeScriptError;
|
||||
error: NativeScriptError;
|
||||
}
|
||||
|
||||
/**
|
||||
* The main page path (without the file extension) for the application starting from the application root.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import common = require("./application-common");
|
||||
import * as common from "./application-common";
|
||||
import {Frame, NavigationEntry} from "ui/frame";
|
||||
import definition = require("application");
|
||||
import * as definition from "application";
|
||||
import * as uiUtils from "ui/utils";
|
||||
import * as typesModule from "utils/types";
|
||||
import * as utils from "utils/utils";
|
||||
@@ -222,7 +222,7 @@ global.__onUncaughtError = function (error: definition.NativeScriptError) {
|
||||
typedExports.onUncaughtError(error);
|
||||
}
|
||||
|
||||
typedExports.notify({ eventName: typedExports.uncaughtErrorEvent, object: typedExports.ios, ios: error });
|
||||
typedExports.notify({ eventName: typedExports.uncaughtErrorEvent, object: typedExports.ios, ios: error, error });
|
||||
}
|
||||
|
||||
function loadCss() {
|
||||
|
||||
Reference in New Issue
Block a user