forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathangular-es.d.ts
More file actions
187 lines (166 loc) · 4.38 KB
/
Copy pathangular-es.d.ts
File metadata and controls
187 lines (166 loc) · 4.38 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
// Type definitions for angular-es v0.0.3
// Project: https://github.com/mbutsykin/angular-es
// Definitions by: mbutsykin <https://github.com/mbutsykin/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'angular-es' {
interface ClassDecorator {
<TFunction extends Function>(target: TFunction): TFunction|void;
}
interface MethodDecorator {
<T>(target: Object, propertyKey: string|symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>|void;
}
/**
* Decorated target
*/
interface ngESDecorator extends ClassDecorator, MethodDecorator {
(target: Object|Function,
ngName?: string,
ngArguments?: Array<any>,
ngType?: string,
injectAsProperty?: Array<string>): void;
}
/**
* Component interface
* @see https://docs.angularjs.org/guide/component
*/
interface iComponent {
template: string,
selector: string,
controllerAs?: string,
require?: string,
templateUrl?: string,
transclude?: string,
bindings?: Object
}
/**
* Register component
*
* @param {Object<iComponent>} component - component config
*
* @returns {ngESDecorator} - decorated class
*/
function Component(component: iComponent): ngESDecorator;
/**
* Register config block
*/
function Config(): ngESDecorator;
/**
* Register constant
*
* @param {string} name - constant name
*
* @returns {ngESDecorator} - decorated class
*/
function Constant(name: string): ngESDecorator;
/**
* Register controller
*
* @param {string} name - controller name
*
* @returns {ngESDecorator} - decorated class
*/
function Controller(name: string): ngESDecorator;
/**
* Register decorator
*
* @param {string} name - provider name to decorate
*
* @returns {ngESDecorator} - decorated class
*/
function Decorator(name: string): ngESDecorator;
/**
* Register directive
*
* @param {string} name - directive selector, can be in hyphen-case
*
* @returns {ngESDecorator} - decorated class
*/
function Directive(name: string): ngESDecorator;
/**
* Register factory
*
* @param {string} name - factory name
*
* @returns {ngESDecorator} - decorated class
*/
function Factory(name: string): ngESDecorator;
/**
* Register filter
*
* @param {string} name - filter name
*
* @returns {ngESDecorator} - decorated class
*/
function Filter(name: string): ngESDecorator;
/**
* Add $inject property to target
*
* @param {Array<string>} dependencies - dependencies to inject
*
* @returns {ngESDecorator} - decorated class
*/
function Inject(...dependencies: Array<string>): ngESDecorator;
/**
* Inject dependencies as properties to target
*
* @param {Array<string>} dependencies - dependencies to inject
*
* @returns {ngESDecorator} - decorated class
*/
function InjectAsProperty(...dependencies: Array<string>): ngESDecorator;
/**
* Attach target to the specified module
*
* @param {string} name - module name
*
* @returns {ngESDecorator} - decorated class
*/
function Module(name: string): ngESDecorator;
/**
* Register provider
*
* @param {string} name - provider name
*
* @returns {ngESDecorator} - decorated class
*/
function Provider(name: string): ngESDecorator;
/**
* Register run block
*
* @returns {ngESDecorator} - decorated class
*/
function Run(): ngESDecorator;
/**
* Register service
*
* @param {string} name - service name
*
* @returns {ngESDecorator} - decorated class
*/
function Service(name: string): ngESDecorator;
/**
* Register value
*
* @param {string} name - value name
*
* @returns {ngESDecorator} - decorated class
*/
function Value(name: string): ngESDecorator;
export {
Component,
Config,
Constant,
Controller,
Decorator,
Directive,
Factory,
Filter,
Inject,
InjectAsProperty,
Module,
Provider,
Run,
Service,
Value,
}
}