1 |
|
2 |
|
3 |
|
4 |
|
5 | interface Cordova {
|
6 | |
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | exec(success: (data: any) => any, fail: (err: any) => any, service: string, action: string, args?: any[]): void;
|
14 |
|
15 | platformId: string;
|
16 |
|
17 | version: string;
|
18 |
|
19 | define(moduleName: string, factory: (require: any, exports: any, module: any) => any): void;
|
20 |
|
21 | require(moduleName: string): any;
|
22 |
|
23 | plugins: CordovaPlugins;
|
24 | }
|
25 |
|
26 | interface CordovaPlugins {}
|
27 |
|
28 | interface Document {
|
29 | addEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void;
|
30 | addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
|
31 | addEventListener(type: "resume", listener: (ev: Event) => any, useCapture?: boolean): void;
|
32 | addEventListener(type: "backbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
33 | addEventListener(type: "menubutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
34 | addEventListener(type: "searchbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
35 | addEventListener(type: "startcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
36 | addEventListener(type: "endcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
37 | addEventListener(type: "volumedownbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
38 | addEventListener(type: "volumeupbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
39 |
|
40 | removeEventListener(type: "deviceready", listener: (ev: Event) => any, useCapture?: boolean): void;
|
41 | removeEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
|
42 | removeEventListener(type: "resume", listener: (ev: Event) => any, useCapture?: boolean): void;
|
43 | removeEventListener(type: "backbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
44 | removeEventListener(type: "menubutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
45 | removeEventListener(type: "searchbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
46 | removeEventListener(type: "startcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
47 | removeEventListener(type: "endcallbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
48 | removeEventListener(type: "volumedownbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
49 | removeEventListener(type: "volumeupbutton", listener: (ev: Event) => any, useCapture?: boolean): void;
|
50 |
|
51 | addEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void;
|
52 | removeEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void;
|
53 | }
|
54 |
|
55 | interface Window {
|
56 | cordova: Cordova;
|
57 | }
|
58 |
|
59 |
|
60 | interface ArgsCheck {
|
61 | checkArgs(argsSpec: string, functionName: string, args: any[], callee?: any): void;
|
62 | getValue(value?: any, defaultValue?: any): any;
|
63 | enableChecks: boolean;
|
64 | }
|
65 |
|
66 |
|
67 | interface UrlUtil {
|
68 | makeAbsolute(url: string): string;
|
69 | }
|
70 |
|
71 |
|
72 | declare var cordova: Cordova;
|
73 |
|
74 | declare module "cordova" {
|
75 | export = cordova;
|
76 | }
|
77 |
|
78 | interface Navigator {
|
79 |
|
80 | splashscreen: {
|
81 |
|
82 | hide(): void;
|
83 |
|
84 | show(): void;
|
85 | };
|
86 | }
|