-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathangular1.d-DnOc0Rx9.d.ts
executable file
·334 lines (328 loc) · 13.8 KB
/
angular1.d-DnOc0Rx9.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
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
/**
* @license Angular v20.0.0-next.3+sha-164bb3f
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
import { Version } from '@angular/core';
/**
* @module
* @description
* Entry point for all public APIs of the upgrade package.
*/
/**
* @publicApi
*/
declare const VERSION: Version;
type Ng1Token = string;
type Ng1Expression = string | Function;
interface IAnnotatedFunction extends Function {
$inject?: Function extends {
$inject?: string[];
} ? Ng1Token[] : ReadonlyArray<Ng1Token>;
}
type IInjectable = (Ng1Token | Function)[] | IAnnotatedFunction;
type SingleOrListOrMap<T> = T | T[] | {
[key: string]: T;
};
interface IModule {
name: string;
requires: (string | IInjectable)[];
config(fn: IInjectable): IModule;
directive(selector: string, factory: IInjectable): IModule;
component(selector: string, component: IComponent): IModule;
controller(name: string, type: IInjectable): IModule;
factory(key: Ng1Token, factoryFn: IInjectable): IModule;
value(key: Ng1Token, value: any): IModule;
constant(token: Ng1Token, value: any): IModule;
run(a: IInjectable): IModule;
}
interface ICompileService {
(element: Element | NodeList | Node[] | string, transclude?: Function): ILinkFn;
}
interface ILinkFn {
(scope: IScope, cloneAttachFn?: ICloneAttachFunction, options?: ILinkFnOptions): IAugmentedJQuery;
$$slots?: {
[slotName: string]: ILinkFn;
};
}
interface ILinkFnOptions {
parentBoundTranscludeFn?: Function;
transcludeControllers?: {
[key: string]: any;
};
futureParentElement?: Node;
}
interface IRootScopeService {
$new(isolate?: boolean): IScope;
$id: string;
$parent: IScope;
$root: IScope;
$watch(exp: Ng1Expression, fn?: (a1?: any, a2?: any) => void): Function;
$on(event: string, fn?: (event?: any, ...args: any[]) => void): Function;
$destroy(): any;
$apply(exp?: Ng1Expression): any;
$digest(): any;
$evalAsync(exp: Ng1Expression, locals?: any): void;
$on(event: string, fn?: (event?: any, ...args: any[]) => void): Function;
$$childTail: IScope;
$$childHead: IScope;
$$nextSibling: IScope;
$$phase: any;
[key: string]: any;
}
interface IScope extends IRootScopeService {
}
interface IAngularBootstrapConfig {
strictDi?: boolean;
}
interface IDirective {
compile?: IDirectiveCompileFn;
controller?: IController;
controllerAs?: string;
bindToController?: boolean | {
[key: string]: string;
};
link?: IDirectiveLinkFn | IDirectivePrePost;
name?: string;
priority?: number;
replace?: boolean;
require?: DirectiveRequireProperty;
restrict?: string;
scope?: boolean | {
[key: string]: string;
};
template?: string | Function;
templateUrl?: string | Function;
templateNamespace?: string;
terminal?: boolean;
transclude?: DirectiveTranscludeProperty;
}
type DirectiveRequireProperty = SingleOrListOrMap<string>;
type DirectiveTranscludeProperty = boolean | 'element' | {
[key: string]: string;
};
interface IDirectiveCompileFn {
(templateElement: IAugmentedJQuery, templateAttributes: IAttributes, transclude: ITranscludeFunction): IDirectivePrePost;
}
interface IDirectivePrePost {
pre?: IDirectiveLinkFn;
post?: IDirectiveLinkFn;
}
interface IDirectiveLinkFn {
(scope: IScope, instanceElement: IAugmentedJQuery, instanceAttributes: IAttributes, controller: any, transclude: ITranscludeFunction): void;
}
interface IComponent {
bindings?: {
[key: string]: string;
};
controller?: string | IInjectable;
controllerAs?: string;
require?: DirectiveRequireProperty;
template?: string | Function;
templateUrl?: string | Function;
transclude?: DirectiveTranscludeProperty;
}
interface IAttributes {
$observe(attr: string, fn: (v: string) => void): void;
[key: string]: any;
}
interface ITranscludeFunction {
(scope: IScope, cloneAttachFn: ICloneAttachFunction): IAugmentedJQuery;
(cloneAttachFn?: ICloneAttachFunction): IAugmentedJQuery;
}
interface ICloneAttachFunction {
(clonedElement: IAugmentedJQuery, scope: IScope): any;
}
type IAugmentedJQuery = Node[] & {
on?: (name: string, fn: () => void) => void;
data?: (name: string, value?: any) => any;
text?: () => string;
inheritedData?: (name: string, value?: any) => any;
children?: () => IAugmentedJQuery;
contents?: () => IAugmentedJQuery;
parent?: () => IAugmentedJQuery;
empty?: () => void;
append?: (content: IAugmentedJQuery | string) => IAugmentedJQuery;
controller?: (name: string) => any;
isolateScope?: () => IScope;
injector?: () => IInjectorService;
triggerHandler?: (eventTypeOrObject: string | Event, extraParameters?: any[]) => IAugmentedJQuery;
remove?: () => void;
removeData?: () => void;
};
interface IProvider {
$get: IInjectable;
}
interface IProvideService {
provider(token: Ng1Token, provider: IProvider): IProvider;
factory(token: Ng1Token, factory: IInjectable): IProvider;
service(token: Ng1Token, type: IInjectable): IProvider;
value(token: Ng1Token, value: any): IProvider;
constant(token: Ng1Token, value: any): void;
decorator(token: Ng1Token, factory: IInjectable): void;
}
interface IParseService {
(expression: string): ICompiledExpression;
}
interface ICompiledExpression {
(context: any, locals: any): any;
assign?: (context: any, value: any) => any;
}
interface IHttpBackendService {
(method: string, url: string, post?: any, callback?: Function, headers?: any, timeout?: number, withCredentials?: boolean): void;
}
interface ICacheObject {
put<T>(key: string, value?: T): T;
get(key: string): any;
}
interface ITemplateCacheService extends ICacheObject {
}
type IController = string | IInjectable;
interface IControllerService {
(controllerConstructor: IController, locals?: any, later?: any, ident?: any): any;
(controllerName: string, locals?: any): any;
}
interface IInjectorService {
get(key: string): any;
has(key: string): boolean;
}
interface IIntervalService {
(func: Function, delay: number, count?: number, invokeApply?: boolean, ...args: any[]): Promise<any>;
cancel(promise: Promise<any>): boolean;
}
interface ITestabilityService {
findBindings(element: Element, expression: string, opt_exactMatch?: boolean): Element[];
findModels(element: Element, expression: string, opt_exactMatch?: boolean): Element[];
getLocation(): string;
setLocation(url: string): void;
whenStable(callback: Function): void;
}
interface INgModelController {
$render(): void;
$isEmpty(value: any): boolean;
$setValidity(validationErrorKey: string, isValid: boolean): void;
$setPristine(): void;
$setDirty(): void;
$setUntouched(): void;
$setTouched(): void;
$rollbackViewValue(): void;
$validate(): void;
$commitViewValue(): void;
$setViewValue(value: any, trigger: string): void;
$viewValue: any;
$modelValue: any;
$parsers: Function[];
$formatters: Function[];
$validators: {
[key: string]: Function;
};
$asyncValidators: {
[key: string]: Function;
};
$viewChangeListeners: Function[];
$error: Object;
$pending: Object;
$untouched: boolean;
$touched: boolean;
$pristine: boolean;
$dirty: boolean;
$valid: boolean;
$invalid: boolean;
$name: string;
}
declare let angular: {
bootstrap: (e: Element, modules: (string | IInjectable)[], config?: IAngularBootstrapConfig) => IInjectorService;
module: (prefix: string, dependencies?: string[]) => IModule;
element: {
(e: string | Element | Document | IAugmentedJQuery): IAugmentedJQuery;
cleanData: (nodes: Node[] | NodeList) => void;
};
injector: (modules: Array<string | IInjectable>, strictDi?: boolean) => IInjectorService;
version: {
major: number;
};
resumeBootstrap: () => void;
getTestability: (e: Element) => ITestabilityService;
};
/**
* @deprecated Use `setAngularJSGlobal` instead.
*
* @publicApi
*/
declare function setAngularLib(ng: any): void;
/**
* @deprecated Use `getAngularJSGlobal` instead.
*
* @publicApi
*/
declare function getAngularLib(): any;
/**
* Resets the AngularJS global.
*
* Used when AngularJS is loaded lazily, and not available on `window`.
*
* @publicApi
*/
declare function setAngularJSGlobal(ng: any): void;
/**
* Returns the current AngularJS global.
*
* @publicApi
*/
declare function getAngularJSGlobal(): any;
declare const bootstrap: typeof angular.bootstrap;
declare const module_: typeof angular.module;
declare const element: typeof angular.element;
declare const injector: typeof angular.injector;
declare const resumeBootstrap: typeof angular.resumeBootstrap;
declare const getTestability: typeof angular.getTestability;
type angular1_d_DirectiveRequireProperty = DirectiveRequireProperty;
type angular1_d_DirectiveTranscludeProperty = DirectiveTranscludeProperty;
type angular1_d_IAngularBootstrapConfig = IAngularBootstrapConfig;
type angular1_d_IAnnotatedFunction = IAnnotatedFunction;
type angular1_d_IAttributes = IAttributes;
type angular1_d_IAugmentedJQuery = IAugmentedJQuery;
type angular1_d_ICacheObject = ICacheObject;
type angular1_d_ICloneAttachFunction = ICloneAttachFunction;
type angular1_d_ICompileService = ICompileService;
type angular1_d_ICompiledExpression = ICompiledExpression;
type angular1_d_IComponent = IComponent;
type angular1_d_IController = IController;
type angular1_d_IControllerService = IControllerService;
type angular1_d_IDirective = IDirective;
type angular1_d_IDirectiveCompileFn = IDirectiveCompileFn;
type angular1_d_IDirectiveLinkFn = IDirectiveLinkFn;
type angular1_d_IDirectivePrePost = IDirectivePrePost;
type angular1_d_IHttpBackendService = IHttpBackendService;
type angular1_d_IInjectable = IInjectable;
type angular1_d_IInjectorService = IInjectorService;
type angular1_d_IIntervalService = IIntervalService;
type angular1_d_ILinkFn = ILinkFn;
type angular1_d_ILinkFnOptions = ILinkFnOptions;
type angular1_d_IModule = IModule;
type angular1_d_INgModelController = INgModelController;
type angular1_d_IParseService = IParseService;
type angular1_d_IProvideService = IProvideService;
type angular1_d_IProvider = IProvider;
type angular1_d_IRootScopeService = IRootScopeService;
type angular1_d_IScope = IScope;
type angular1_d_ITemplateCacheService = ITemplateCacheService;
type angular1_d_ITestabilityService = ITestabilityService;
type angular1_d_ITranscludeFunction = ITranscludeFunction;
type angular1_d_Ng1Expression = Ng1Expression;
type angular1_d_Ng1Token = Ng1Token;
type angular1_d_SingleOrListOrMap<T> = SingleOrListOrMap<T>;
declare const angular1_d_bootstrap: typeof bootstrap;
declare const angular1_d_element: typeof element;
declare const angular1_d_getAngularJSGlobal: typeof getAngularJSGlobal;
declare const angular1_d_getAngularLib: typeof getAngularLib;
declare const angular1_d_getTestability: typeof getTestability;
declare const angular1_d_injector: typeof injector;
declare const angular1_d_module_: typeof module_;
declare const angular1_d_resumeBootstrap: typeof resumeBootstrap;
declare const angular1_d_setAngularJSGlobal: typeof setAngularJSGlobal;
declare const angular1_d_setAngularLib: typeof setAngularLib;
declare namespace angular1_d {
export { type angular1_d_DirectiveRequireProperty as DirectiveRequireProperty, type angular1_d_DirectiveTranscludeProperty as DirectiveTranscludeProperty, type angular1_d_IAngularBootstrapConfig as IAngularBootstrapConfig, type angular1_d_IAnnotatedFunction as IAnnotatedFunction, type angular1_d_IAttributes as IAttributes, type angular1_d_IAugmentedJQuery as IAugmentedJQuery, type angular1_d_ICacheObject as ICacheObject, type angular1_d_ICloneAttachFunction as ICloneAttachFunction, type angular1_d_ICompileService as ICompileService, type angular1_d_ICompiledExpression as ICompiledExpression, type angular1_d_IComponent as IComponent, type angular1_d_IController as IController, type angular1_d_IControllerService as IControllerService, type angular1_d_IDirective as IDirective, type angular1_d_IDirectiveCompileFn as IDirectiveCompileFn, type angular1_d_IDirectiveLinkFn as IDirectiveLinkFn, type angular1_d_IDirectivePrePost as IDirectivePrePost, type angular1_d_IHttpBackendService as IHttpBackendService, type angular1_d_IInjectable as IInjectable, type angular1_d_IInjectorService as IInjectorService, type angular1_d_IIntervalService as IIntervalService, type angular1_d_ILinkFn as ILinkFn, type angular1_d_ILinkFnOptions as ILinkFnOptions, type angular1_d_IModule as IModule, type angular1_d_INgModelController as INgModelController, type angular1_d_IParseService as IParseService, type angular1_d_IProvideService as IProvideService, type angular1_d_IProvider as IProvider, type angular1_d_IRootScopeService as IRootScopeService, type angular1_d_IScope as IScope, type angular1_d_ITemplateCacheService as ITemplateCacheService, type angular1_d_ITestabilityService as ITestabilityService, type angular1_d_ITranscludeFunction as ITranscludeFunction, type angular1_d_Ng1Expression as Ng1Expression, type angular1_d_Ng1Token as Ng1Token, type angular1_d_SingleOrListOrMap as SingleOrListOrMap, angular1_d_bootstrap as bootstrap, angular1_d_element as element, angular1_d_getAngularJSGlobal as getAngularJSGlobal, angular1_d_getAngularLib as getAngularLib, angular1_d_getTestability as getTestability, angular1_d_injector as injector, angular1_d_module_ as module_, angular1_d_resumeBootstrap as resumeBootstrap, angular1_d_setAngularJSGlobal as setAngularJSGlobal, angular1_d_setAngularLib as setAngularLib };
}
export { type IRootScopeService as I, type SingleOrListOrMap as S, VERSION as V, type IInjectorService as a, type IAngularBootstrapConfig as b, type IAugmentedJQuery as c, type IDirective as d, type IController as e, type IScope as f, type ILinkFn as g, type INgModelController as h, getAngularJSGlobal as i, getAngularLib as j, setAngularLib as k, angular1_d as l, setAngularJSGlobal as s };