mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
chore: remove critical circular dependencies (#8114)
* chore: remove critical circular dependencies * chore: fix tslint errors * chore: remove platform specific types from interfaces * chore: update unit tests polyfills * fix: incorrect null check * chore: update api.md file * test: improve test case * chore: apply comments * test: avoid page style leaks in tests
This commit is contained in:

committed by
Alexander Vakrilov

parent
5b647bd809
commit
0ffc790d82
79
nativescript-core/application/application-interfaces.ts
Normal file
79
nativescript-core/application/application-interfaces.ts
Normal file
@ -0,0 +1,79 @@
|
||||
// Types
|
||||
import { EventData } from "../data/observable/observable-interfaces";
|
||||
import { View } from "../ui/core/view";
|
||||
|
||||
export interface ApplicationEventData extends EventData {
|
||||
ios?: any;
|
||||
android?: any;
|
||||
eventName: string;
|
||||
object: any;
|
||||
}
|
||||
|
||||
export interface LaunchEventData extends ApplicationEventData {
|
||||
root?: View;
|
||||
savedInstanceState?: any /* android.os.Bundle */;
|
||||
}
|
||||
|
||||
export interface OrientationChangedEventData extends ApplicationEventData {
|
||||
newValue: "portrait" | "landscape" | "unknown";
|
||||
}
|
||||
|
||||
export interface SystemAppearanceChangedEventData extends ApplicationEventData {
|
||||
newValue: "light" | "dark";
|
||||
}
|
||||
|
||||
export interface UnhandledErrorEventData extends ApplicationEventData {
|
||||
ios?: NativeScriptError;
|
||||
android?: NativeScriptError;
|
||||
error: NativeScriptError;
|
||||
}
|
||||
|
||||
export interface DiscardedErrorEventData extends ApplicationEventData {
|
||||
error: NativeScriptError;
|
||||
}
|
||||
|
||||
export interface CssChangedEventData extends EventData {
|
||||
cssFile?: string;
|
||||
cssText?: string;
|
||||
}
|
||||
|
||||
export interface AndroidActivityEventData {
|
||||
activity: any /* androidx.appcompat.app.AppCompatActivity */;
|
||||
eventName: string;
|
||||
object: any;
|
||||
}
|
||||
|
||||
export interface AndroidActivityBundleEventData extends AndroidActivityEventData {
|
||||
bundle: any /* android.os.Bundle */;
|
||||
}
|
||||
|
||||
export interface AndroidActivityRequestPermissionsEventData extends AndroidActivityEventData {
|
||||
requestCode: number;
|
||||
permissions: Array<string>;
|
||||
grantResults: Array<number>;
|
||||
}
|
||||
|
||||
export interface AndroidActivityResultEventData extends AndroidActivityEventData {
|
||||
requestCode: number;
|
||||
resultCode: number;
|
||||
intent: any /* android.content.Intent */;
|
||||
}
|
||||
|
||||
export interface AndroidActivityNewIntentEventData extends AndroidActivityEventData {
|
||||
intent: any /* android.content.Intent */;
|
||||
}
|
||||
|
||||
export interface AndroidActivityBackPressedEventData extends AndroidActivityEventData {
|
||||
cancel: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export interface RootViewControllerImpl {
|
||||
contentController: any;
|
||||
}
|
||||
|
||||
export interface LoadAppCSSEventData extends EventData {
|
||||
cssFile: string;
|
||||
}
|
Reference in New Issue
Block a user