-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.d.ts
104 lines (83 loc) · 2.62 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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
interface TestServInterface {
new(serviceName: string): TestServInstance;
new(): any;
}
export interface TestServPromise {
success(arg?: any): any;
fail(arg?: any): any;
}
interface TestServInstance {
addPromise(name: string): TestServInstance;
addMethod(name: string, returnedValue: any): TestServInstance;
addMethod<T>(name: string, fn: (...args: any[]) => T): TestServInstance;
addProperty(name: string, returnedValue: any): TestServInstance;
get<T>(name: string): T;
}
export var TestServ: TestServInterface;
interface ControllerInstance {}
interface createDirComp {
(name: string, html: string, scope: any): JQuery;
}
interface TestElementInterface {
new(): TestElementInstance;
}
export interface DummyPromiseInterface {
then(fn: Function): void;
}
interface TestElementInstance {
$originalScope: ng.IScope;
$compile: ng.ICompileService;
$timeout: ng.ITimeoutService;
$controller: ng.IControllerService;
$templateCache: ng.ITemplateCacheService;
$filter: ng.IFilterService;
name: string;
createCtrl<T>(name: string, services?: any): T;
addTemplate(path: string, ctrlAs?: string): ng.IAugmentedJQuery;
createDirective: createDirComp;
createComponent: createDirComp;
createFilter<T>(name: string): T;
scope: ng.IScope;
ctrl: any;
dom: ng.IAugmentedJQuery;
find(selector: string): ng.IAugmentedJQuery;
findAll(selector: string): ng.IAugmentedJQuery[];
destroy(): void;
clickOn(selector: string): DummyPromiseInterface;
inputOn(selector: string, value: any, which?: number): DummyPromiseInterface;
_getFlushedThenable(): DummyPromiseInterface;
}
export var TestElement: TestElementInterface;
interface DummyFilter {
<T>(input: T): T;
}
interface DummyDirective {
restrict: string;
}
interface TestDummyInterface {
filter: DummyFilter;
directive: DummyDirective[]
}
export var TestDummy: TestDummyInterface;
interface TestModuleInstance {
hasModule(name: string): boolean;
}
interface TestModuleInterface {
new(name: string): TestModuleInstance;
}
export var TestModule: TestModuleInterface;
interface SequenceInterface {
(): any;
clear(): void;
}
interface TestFactoryInterface {
define(name: string, attributes: any): void;
create<T>(name: string, attributes?: T): T;
createList<T>(name: string, number: number, attributes?: any): T[];
defineSequence(name: string): void;
defineSequence(name: string, argOne: number): void;
defineSequence(name: string, argOne: Function): void;
defineSequence<T>(name: string, argOne: (arg: T) => any, argTwo: T): void;
sequence(name: string): SequenceInterface;
}
export var TestFactory: TestFactoryInterface;