forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinterfaces.ts
90 lines (73 loc) · 2.47 KB
/
interfaces.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import Vue from 'vue';
import VueRouter from 'vue-router';
import { RouterOptions } from 'vue-router/types/router';
declare module 'vue-router/types/router' {
interface VueRouter {
direction: number;
directionOverride: number | null;
transition: Promise<void>;
canGoBack(): boolean;
}
}
export interface HTMLVueElement extends HTMLElement {
__vue__: Vue;
}
export interface VueWindow extends Window {
Vue: typeof Vue;
VueRouter: typeof VueRouter;
disableIonicTransitions: boolean;
}
export interface WebpackFunction extends Function {
cid: number;
}
export interface EsModule extends Object {
__esModule?: boolean;
[Symbol.toStringTag]: string;
}
export interface IonicGlobal {
config?: any;
ael?: (elm: any, eventName: string, cb: (ev: Event) => void, opts: any) => void;
raf?: (ts: number) => void;
rel?: (elm: any, eventName: string, cb: (ev: Event) => void, opts: any) => void;
}
export interface IonicWindow extends Window {
Ionic: IonicGlobal;
}
export interface FrameworkDelegate {
attachViewToDom(parentElement: HTMLElement, component: HTMLElement | WebpackFunction | object | Vue, opts?: object, classes?: string[]): Promise<HTMLElement>;
removeViewFromDom(parentElement: HTMLElement, childElement: HTMLVueElement): Promise<void>;
}
export interface IonBackButton extends HTMLStencilElement {
defaultHref?: string;
}
export interface IonRouterOutlet extends HTMLStencilElement {
commit(enterinEl: HTMLElement, leavingEl: HTMLElement | undefined, opts?: object | undefined): Promise<boolean>;
}
export interface ApiCache {
[key: string]: any;
}
export interface RouterArgs extends RouterOptions {
direction?: number;
viewCount?: number;
}
export interface ProxyControllerInterface {
create(opts: object): Promise<HTMLElement>;
dismiss(): Promise<void>;
getTop(): Promise<HTMLElement>;
}
export interface ProxyDelegateOptions extends Object {
[key: string]: any;
delegate?: FrameworkDelegate;
}
export interface ProxyMenuControllerInterface {
open(menuId?: string): Promise<boolean>;
close(menuId?: string): Promise<boolean>;
toggle(menuId?: string): Promise<boolean>;
enable(shouldEnable: boolean, menuId?: string): Promise<HTMLElement>;
swipeEnable(shouldEnable: boolean, menuId?: string): Promise<HTMLElement>;
isOpen(menuId?: string): Promise<boolean>;
isEnabled(menuId?: string): Promise<boolean>;
get(menuId?: string): Promise<HTMLElement>;
getOpen(): Promise<HTMLElement>;
getMenus(): Promise<HTMLElement>;
}