-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
45 lines (39 loc) · 1.12 KB
/
index.d.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
export var mocks : MocksWrapper;
export var delegates : DelegatesWrapper;
interface MocksWrapper {
MockBrowser : MockBrowser;
MockStorage : MockStorage;
}
interface DelegatesWrapper {
AbstractBrowser : AbstractBrowser;
}
interface AbstractBrowser {
new (options? : Options) : AbstractBrowser;
extend(child : any, options : Options) : AbstractBrowser;
getDocument() : Document;
getWindow() : Window;
getHistory() : History;
getLocation() : Location;
getLocalStorage() : WindowLocalStorage;
getSessionStorage() : WindowSessionStorage;
getNavigator() : Navigator;
}
interface Options {
window? : Window;
localStorage? : WindowLocalStorage;
sessionStorage? : WindowSessionStorage;
}
interface MockBrowser extends AbstractBrowser {
new (options? : any) : MockBrowser;
createDocument() : Document;
createWindow() : Window;
}
interface MockStorage {
new (data? : any) : MockStorage;
key(index : number) : any;
setItem(key : string, value : any) : void;
getItem(key : string) : any;
removeItem(key : string) : void;
clear() : void;
length : number;
}