Commit 4946a477fd523398f2a1cc37feedcf1be1c27be5
1 parent
58bfed19
Exists in
master
and in
35 other branches
fix previous commit
Showing
13 changed files
with
1 additions
and
12534 deletions
Show diff stats
.gitignore
typings/browser.d.ts
... | ... | @@ -1,5 +0,0 @@ |
1 | -/// <reference path="browser/ambient/angular-ui-router/angular-ui-router.d.ts" /> | |
2 | -/// <reference path="browser/ambient/angular/angular.d.ts" /> | |
3 | -/// <reference path="browser/ambient/es6-shim/es6-shim.d.ts" /> | |
4 | -/// <reference path="browser/ambient/jquery/jquery.d.ts" /> | |
5 | -/// <reference path="browser/ambient/restangular/restangular.d.ts" /> |
typings/browser/ambient/angular-ui-router/angular-ui-router.d.ts
... | ... | @@ -1,364 +0,0 @@ |
1 | -// Compiled using typings@0.6.8 | |
2 | -// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/655f8c1bf3c71b0e1ba415b36309604f79326ac8/angular-ui-router/angular-ui-router.d.ts | |
3 | -// Type definitions for Angular JS 1.1.5+ (ui.router module) | |
4 | -// Project: https://github.com/angular-ui/ui-router | |
5 | -// Definitions by: Michel Salib <https://github.com/michelsalib> | |
6 | -// Definitions: https://github.com/borisyankov/DefinitelyTyped | |
7 | - | |
8 | - | |
9 | -// Support for AMD require and CommonJS | |
10 | -declare module 'angular-ui-router' { | |
11 | - // Since angular-ui-router adds providers for a bunch of | |
12 | - // injectable dependencies, it doesn't really return any | |
13 | - // actual data except the plain string 'ui.router'. | |
14 | - // | |
15 | - // As such, I don't think anybody will ever use the actual | |
16 | - // default value of the module. So I've only included the | |
17 | - // the types. (@xogeny) | |
18 | - export type IState = angular.ui.IState; | |
19 | - export type IStateProvider = angular.ui.IStateProvider; | |
20 | - export type IUrlMatcher = angular.ui.IUrlMatcher; | |
21 | - export type IUrlRouterProvider = angular.ui.IUrlRouterProvider; | |
22 | - export type IStateOptions = angular.ui.IStateOptions; | |
23 | - export type IHrefOptions = angular.ui.IHrefOptions; | |
24 | - export type IStateService = angular.ui.IStateService; | |
25 | - export type IResolvedState = angular.ui.IResolvedState; | |
26 | - export type IStateParamsService = angular.ui.IStateParamsService; | |
27 | - export type IUrlRouterService = angular.ui.IUrlRouterService; | |
28 | - export type IUiViewScrollProvider = angular.ui.IUiViewScrollProvider; | |
29 | - export type IType = angular.ui.IType; | |
30 | -} | |
31 | - | |
32 | -declare module angular.ui { | |
33 | - | |
34 | - interface IState { | |
35 | - name?: string; | |
36 | - /** | |
37 | - * String HTML content, or function that returns an HTML string | |
38 | - */ | |
39 | - template?: string | {(): string}; | |
40 | - /** | |
41 | - * String URL path to template file OR Function, returns URL path string | |
42 | - */ | |
43 | - templateUrl?: string | {(params: IStateParamsService): string}; | |
44 | - /** | |
45 | - * Function, returns HTML content string | |
46 | - */ | |
47 | - templateProvider?: Function | Array<string|Function>; | |
48 | - /** | |
49 | - * A controller paired to the state. Function, annotated array or name as String | |
50 | - */ | |
51 | - controller?: Function|string|Array<string|Function>; | |
52 | - controllerAs?: string; | |
53 | - /** | |
54 | - * Function (injectable), returns the actual controller function or string. | |
55 | - */ | |
56 | - controllerProvider?: Function|Array<string|Function>; | |
57 | - | |
58 | - /** | |
59 | - * Specifies the parent state of this state | |
60 | - */ | |
61 | - parent?: string | IState; | |
62 | - | |
63 | - | |
64 | - resolve?: { [name:string]: any }; | |
65 | - /** | |
66 | - * A url with optional parameters. When a state is navigated or transitioned to, the $stateParams service will be populated with any parameters that were passed. | |
67 | - */ | |
68 | - url?: string | IUrlMatcher; | |
69 | - /** | |
70 | - * A map which optionally configures parameters declared in the url, or defines additional non-url parameters. Only use this within a state if you are not using url. Otherwise you can specify your parameters within the url. When a state is navigated or transitioned to, the $stateParams service will be populated with any parameters that were passed. | |
71 | - */ | |
72 | - params?: any; | |
73 | - /** | |
74 | - * Use the views property to set up multiple views. If you don't need multiple views within a single state this property is not needed. Tip: remember that often nested views are more useful and powerful than multiple sibling views. | |
75 | - */ | |
76 | - views?: { [name:string]: IState }; | |
77 | - abstract?: boolean; | |
78 | - /** | |
79 | - * Callback function for when a state is entered. Good way to trigger an action or dispatch an event, such as opening a dialog. | |
80 | - * If minifying your scripts, make sure to explicitly annotate this function, because it won't be automatically annotated by your build tools. | |
81 | - */ | |
82 | - onEnter?: Function|Array<string|Function>; | |
83 | - /** | |
84 | - * Callback functions for when a state is entered and exited. Good way to trigger an action or dispatch an event, such as opening a dialog. | |
85 | - * If minifying your scripts, make sure to explicitly annotate this function, because it won't be automatically annotated by your build tools. | |
86 | - */ | |
87 | - onExit?: Function|Array<string|Function>; | |
88 | - /** | |
89 | - * Arbitrary data object, useful for custom configuration. | |
90 | - */ | |
91 | - data?: any; | |
92 | - | |
93 | - /** | |
94 | - * Boolean (default true). If false will not re-trigger the same state just because a search/query parameter has changed. Useful for when you'd like to modify $location.search() without triggering a reload. | |
95 | - */ | |
96 | - reloadOnSearch?: boolean; | |
97 | - | |
98 | - /** | |
99 | - * Boolean (default true). If false will reload state on everytransitions. Useful for when you'd like to restore all data to its initial state. | |
100 | - */ | |
101 | - cache?: boolean; | |
102 | - } | |
103 | - | |
104 | - interface IStateProvider extends angular.IServiceProvider { | |
105 | - state(name:string, config:IState): IStateProvider; | |
106 | - state(config:IState): IStateProvider; | |
107 | - decorator(name?: string, decorator?: (state: IState, parent: Function) => any): any; | |
108 | - } | |
109 | - | |
110 | - interface IUrlMatcher { | |
111 | - concat(pattern: string): IUrlMatcher; | |
112 | - exec(path: string, searchParams: {}): {}; | |
113 | - parameters(): string[]; | |
114 | - format(values: {}): string; | |
115 | - } | |
116 | - | |
117 | - interface IUrlMatcherFactory { | |
118 | - /** | |
119 | - * Creates a UrlMatcher for the specified pattern. | |
120 | - * | |
121 | - * @param pattern {string} The URL pattern. | |
122 | - * | |
123 | - * @returns {IUrlMatcher} The UrlMatcher. | |
124 | - */ | |
125 | - compile(pattern: string): IUrlMatcher; | |
126 | - /** | |
127 | - * Returns true if the specified object is a UrlMatcher, or false otherwise. | |
128 | - * | |
129 | - * @param o {any} The object to perform the type check against. | |
130 | - * | |
131 | - * @returns {boolean} Returns true if the object matches the IUrlMatcher interface, by implementing all the same methods. | |
132 | - */ | |
133 | - isMatcher(o: any): boolean; | |
134 | - /** | |
135 | - * Returns a type definition for the specified name | |
136 | - * | |
137 | - * @param name {string} The type definition name | |
138 | - * | |
139 | - * @returns {IType} The type definition | |
140 | - */ | |
141 | - type(name: string): IType; | |
142 | - /** | |
143 | - * Registers a custom Type object that can be used to generate URLs with typed parameters. | |
144 | - * | |
145 | - * @param {IType} definition The type definition. | |
146 | - * @param {any[]} inlineAnnotedDefinitionFn A function that is injected before the app runtime starts. The result of this function is merged into the existing definition. | |
147 | - * | |
148 | - * @returns {IUrlMatcherFactory} Returns $urlMatcherFactoryProvider. | |
149 | - */ | |
150 | - type(name: string, definition: IType, inlineAnnotedDefinitionFn?: any[]): IUrlMatcherFactory; | |
151 | - /** | |
152 | - * Registers a custom Type object that can be used to generate URLs with typed parameters. | |
153 | - * | |
154 | - * @param {IType} definition The type definition. | |
155 | - * @param {any[]} inlineAnnotedDefinitionFn A function that is injected before the app runtime starts. The result of this function is merged into the existing definition. | |
156 | - * | |
157 | - * @returns {IUrlMatcherFactory} Returns $urlMatcherFactoryProvider. | |
158 | - */ | |
159 | - type(name: string, definition: IType, definitionFn?: (...args:any[]) => IType): IUrlMatcherFactory; | |
160 | - /** | |
161 | - * Defines whether URL matching should be case sensitive (the default behavior), or not. | |
162 | - * | |
163 | - * @param value {boolean} false to match URL in a case sensitive manner; otherwise true; | |
164 | - * | |
165 | - * @returns {boolean} the current value of caseInsensitive | |
166 | - */ | |
167 | - caseInsensitive(value?: boolean): boolean; | |
168 | - /** | |
169 | - * Sets the default behavior when generating or matching URLs with default parameter values | |
170 | - * | |
171 | - * @param value {string} A string that defines the default parameter URL squashing behavior. nosquash: When generating an href with a default parameter value, do not squash the parameter value from the URL slash: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the parameter is surrounded by slashes, squash (remove) one slash from the URL any other string, e.g. "~": When generating an href with a default parameter value, squash (remove) the parameter value from the URL and replace it with this string. | |
172 | - */ | |
173 | - defaultSquashPolicy(value: string): void; | |
174 | - /** | |
175 | - * Defines whether URLs should match trailing slashes, or not (the default behavior). | |
176 | - * | |
177 | - * @param value {boolean} false to match trailing slashes in URLs, otherwise true. | |
178 | - * | |
179 | - * @returns {boolean} the current value of strictMode | |
180 | - */ | |
181 | - strictMode(value?: boolean): boolean; | |
182 | - } | |
183 | - | |
184 | - interface IUrlRouterProvider extends angular.IServiceProvider { | |
185 | - when(whenPath: RegExp, handler: Function): IUrlRouterProvider; | |
186 | - when(whenPath: RegExp, handler: any[]): IUrlRouterProvider; | |
187 | - when(whenPath: RegExp, toPath: string): IUrlRouterProvider; | |
188 | - when(whenPath: IUrlMatcher, hanlder: Function): IUrlRouterProvider; | |
189 | - when(whenPath: IUrlMatcher, handler: any[]): IUrlRouterProvider; | |
190 | - when(whenPath: IUrlMatcher, toPath: string): IUrlRouterProvider; | |
191 | - when(whenPath: string, handler: Function): IUrlRouterProvider; | |
192 | - when(whenPath: string, handler: any[]): IUrlRouterProvider; | |
193 | - when(whenPath: string, toPath: string): IUrlRouterProvider; | |
194 | - otherwise(handler: Function): IUrlRouterProvider; | |
195 | - otherwise(handler: any[]): IUrlRouterProvider; | |
196 | - otherwise(path: string): IUrlRouterProvider; | |
197 | - rule(handler: Function): IUrlRouterProvider; | |
198 | - rule(handler: any[]): IUrlRouterProvider; | |
199 | - /** | |
200 | - * Disables (or enables) deferring location change interception. | |
201 | - * | |
202 | - * If you wish to customize the behavior of syncing the URL (for example, if you wish to defer a transition but maintain the current URL), call this method at configuration time. Then, at run time, call $urlRouter.listen() after you have configured your own $locationChangeSuccess event handler. | |
203 | - * | |
204 | - * @param {boolean} defer Indicates whether to defer location change interception. Passing no parameter is equivalent to true. | |
205 | - */ | |
206 | - deferIntercept(defer?: boolean): void; | |
207 | - } | |
208 | - | |
209 | - interface IStateOptions { | |
210 | - /** | |
211 | - * {boolean=true|string=} - If true will update the url in the location bar, if false will not. If string, must be "replace", which will update url and also replace last history record. | |
212 | - */ | |
213 | - location?: boolean | string; | |
214 | - /** | |
215 | - * {boolean=true}, If true will inherit url parameters from current url. | |
216 | - */ | |
217 | - inherit?: boolean; | |
218 | - /** | |
219 | - * {object=$state.$current}, When transitioning with relative path (e.g '^'), defines which state to be relative from. | |
220 | - */ | |
221 | - relative?: IState; | |
222 | - /** | |
223 | - * {boolean=true}, If true will broadcast $stateChangeStart and $stateChangeSuccess events. | |
224 | - */ | |
225 | - notify?: boolean; | |
226 | - /** | |
227 | - * {boolean=false}, If true will force transition even if the state or params have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd use this when you want to force a reload when everything is the same, including search params. | |
228 | - */ | |
229 | - reload?: boolean; | |
230 | - } | |
231 | - | |
232 | - interface IHrefOptions { | |
233 | - lossy?: boolean; | |
234 | - inherit?: boolean; | |
235 | - relative?: IState; | |
236 | - absolute?: boolean; | |
237 | - } | |
238 | - | |
239 | - interface IStateService { | |
240 | - /** | |
241 | - * Convenience method for transitioning to a new state. $state.go calls $state.transitionTo internally but automatically sets options to { location: true, inherit: true, relative: $state.$current, notify: true }. This allows you to easily use an absolute or relative to path and specify only the parameters you'd like to update (while letting unspecified parameters inherit from the currently active ancestor states). | |
242 | - * | |
243 | - * @param to Absolute state name or relative state path. Some examples: | |
244 | - * | |
245 | - * $state.go('contact.detail') - will go to the contact.detail state | |
246 | - * $state.go('^') - will go to a parent state | |
247 | - * $state.go('^.sibling') - will go to a sibling state | |
248 | - * $state.go('.child.grandchild') - will go to grandchild state | |
249 | - * | |
250 | - * @param params A map of the parameters that will be sent to the state, will populate $stateParams. Any parameters that are not specified will be inherited from currently defined parameters. This allows, for example, going to a sibling state that shares parameters specified in a parent state. Parameter inheritance only works between common ancestor states, I.e. transitioning to a sibling will get you the parameters for all parents, transitioning to a child will get you all current parameters, etc. | |
251 | - * | |
252 | - * @param options Options object. | |
253 | - */ | |
254 | - go(to: string, params?: {}, options?: IStateOptions): angular.IPromise<any>; | |
255 | - go(to: IState, params?: {}, options?: IStateOptions): angular.IPromise<any>; | |
256 | - transitionTo(state: string, params?: {}, updateLocation?: boolean): angular.IPromise<any>; | |
257 | - transitionTo(state: IState, params?: {}, updateLocation?: boolean): angular.IPromise<any>; | |
258 | - transitionTo(state: string, params?: {}, options?: IStateOptions): angular.IPromise<any>; | |
259 | - transitionTo(state: IState, params?: {}, options?: IStateOptions): angular.IPromise<any>; | |
260 | - includes(state: string, params?: {}): boolean; | |
261 | - includes(state: string, params?: {}, options?:any): boolean; | |
262 | - is(state:string, params?: {}): boolean; | |
263 | - is(state: IState, params?: {}): boolean; | |
264 | - href(state: IState, params?: {}, options?: IHrefOptions): string; | |
265 | - href(state: string, params?: {}, options?: IHrefOptions): string; | |
266 | - get(state: string, context?: string): IState; | |
267 | - get(state: IState, context?: string): IState; | |
268 | - get(state: string, context?: IState): IState; | |
269 | - get(state: IState, context?: IState): IState; | |
270 | - get(): IState[]; | |
271 | - /** A reference to the state's config object. However you passed it in. Useful for accessing custom data. */ | |
272 | - current: IState; | |
273 | - /** A param object, e.g. {sectionId: section.id)}, that you'd like to test against the current active state. */ | |
274 | - params: IStateParamsService; | |
275 | - reload(): angular.IPromise<any>; | |
276 | - | |
277 | - /** Currently pending transition. A promise that'll resolve or reject. */ | |
278 | - transition: angular.IPromise<{}>; | |
279 | - | |
280 | - $current: IResolvedState; | |
281 | - } | |
282 | - | |
283 | - interface IResolvedState { | |
284 | - locals: { | |
285 | - /** | |
286 | - * Currently resolved "resolve" values from the current state | |
287 | - */ | |
288 | - globals: { [key: string]: any; }; | |
289 | - }; | |
290 | - } | |
291 | - | |
292 | - interface IStateParamsService { | |
293 | - [key: string]: any; | |
294 | - } | |
295 | - | |
296 | - interface IUrlRouterService { | |
297 | - /* | |
298 | - * Triggers an update; the same update that happens when the address bar | |
299 | - * url changes, aka $locationChangeSuccess. | |
300 | - * | |
301 | - * This method is useful when you need to use preventDefault() on the | |
302 | - * $locationChangeSuccess event, perform some custom logic (route protection, | |
303 | - * auth, config, redirection, etc) and then finally proceed with the transition | |
304 | - * by calling $urlRouter.sync(). | |
305 | - * | |
306 | - */ | |
307 | - sync(): void; | |
308 | - listen(): Function; | |
309 | - href(urlMatcher: IUrlMatcher, params?: IStateParamsService, options?: IHrefOptions): string; | |
310 | - update(read?: boolean): void; | |
311 | - push(urlMatcher: IUrlMatcher, params?: IStateParamsService, options?: IHrefOptions): void; | |
312 | - } | |
313 | - | |
314 | - interface IUiViewScrollProvider { | |
315 | - /* | |
316 | - * Reverts back to using the core $anchorScroll service for scrolling | |
317 | - * based on the url anchor. | |
318 | - */ | |
319 | - useAnchorScroll(): void; | |
320 | - } | |
321 | - | |
322 | - interface IType { | |
323 | - /** | |
324 | - * Converts a parameter value (from URL string or transition param) to a custom/native value. | |
325 | - * | |
326 | - * @param val {string} The URL parameter value to decode. | |
327 | - * @param key {string} The name of the parameter in which val is stored. Can be used for meta-programming of Type objects. | |
328 | - * | |
329 | - * @returns {any} Returns a custom representation of the URL parameter value. | |
330 | - */ | |
331 | - decode(val: string, key: string): any; | |
332 | - /** | |
333 | - * Encodes a custom/native type value to a string that can be embedded in a URL. Note that the return value does not need to be URL-safe (i.e. passed through encodeURIComponent()), it only needs to be a representation of val that has been coerced to a string. | |
334 | - * | |
335 | - * @param val {any} The value to encode. | |
336 | - * @param key {string} The name of the parameter in which val is stored. Can be used for meta-programming of Type objects. | |
337 | - * | |
338 | - * @returns {string} Returns a string representation of val that can be encoded in a URL. | |
339 | - */ | |
340 | - encode(val: any, key: string): string; | |
341 | - /** | |
342 | - * Determines whether two decoded values are equivalent. | |
343 | - * | |
344 | - * @param a {any} A value to compare against. | |
345 | - * @param b {any} A value to compare against. | |
346 | - * | |
347 | - * @returns {boolean} Returns true if the values are equivalent/equal, otherwise false. | |
348 | - */ | |
349 | - equals? (a: any, b: any): boolean; | |
350 | - /** | |
351 | - * Detects whether a value is of a particular type. Accepts a native (decoded) value and determines whether it matches the current Type object. | |
352 | - * | |
353 | - * @param val {any} The value to check. | |
354 | - * @param key {any} Optional. If the type check is happening in the context of a specific UrlMatcher object, this is the name of the parameter in which val is stored. Can be used for meta-programming of Type objects. | |
355 | - * | |
356 | - * @returns {boolean} Returns true if the value matches the type, otherwise false. | |
357 | - */ | |
358 | - is(val: any, key: string): boolean; | |
359 | - /** | |
360 | - * The regular expression pattern used to match values of this type when coming from a substring of a URL. | |
361 | - */ | |
362 | - pattern?: RegExp; | |
363 | - } | |
364 | -} | |
365 | 0 | \ No newline at end of file |
typings/browser/ambient/angular/angular.d.ts
... | ... | @@ -1,1878 +0,0 @@ |
1 | -// Compiled using typings@0.6.8 | |
2 | -// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/1c4a34873c9e70cce86edd0e61c559e43dfa5f75/angularjs/angular.d.ts | |
3 | -// Type definitions for Angular JS 1.4+ | |
4 | -// Project: http://angularjs.org | |
5 | -// Definitions by: Diego Vilar <http://github.com/diegovilar> | |
6 | -// Definitions: https://github.com/borisyankov/DefinitelyTyped | |
7 | - | |
8 | - | |
9 | - | |
10 | -declare var angular: angular.IAngularStatic; | |
11 | - | |
12 | -// Support for painless dependency injection | |
13 | -interface Function { | |
14 | - $inject?: string[]; | |
15 | -} | |
16 | - | |
17 | -// Collapse angular into ng | |
18 | -import ng = angular; | |
19 | -// Support AMD require | |
20 | -declare module 'angular' { | |
21 | - export = angular; | |
22 | -} | |
23 | - | |
24 | -/////////////////////////////////////////////////////////////////////////////// | |
25 | -// ng module (angular.js) | |
26 | -/////////////////////////////////////////////////////////////////////////////// | |
27 | -declare module angular { | |
28 | - | |
29 | - // not directly implemented, but ensures that constructed class implements $get | |
30 | - interface IServiceProviderClass { | |
31 | - new (...args: any[]): IServiceProvider; | |
32 | - } | |
33 | - | |
34 | - interface IServiceProviderFactory { | |
35 | - (...args: any[]): IServiceProvider; | |
36 | - } | |
37 | - | |
38 | - // All service providers extend this interface | |
39 | - interface IServiceProvider { | |
40 | - $get: any; | |
41 | - } | |
42 | - | |
43 | - interface IAngularBootstrapConfig { | |
44 | - strictDi?: boolean; | |
45 | - debugInfoEnabled?: boolean; | |
46 | - } | |
47 | - | |
48 | - /////////////////////////////////////////////////////////////////////////// | |
49 | - // AngularStatic | |
50 | - // see http://docs.angularjs.org/api | |
51 | - /////////////////////////////////////////////////////////////////////////// | |
52 | - interface IAngularStatic { | |
53 | - bind(context: any, fn: Function, ...args: any[]): Function; | |
54 | - | |
55 | - /** | |
56 | - * Use this function to manually start up angular application. | |
57 | - * | |
58 | - * @param element DOM element which is the root of angular application. | |
59 | - * @param modules An array of modules to load into the application. | |
60 | - * Each item in the array should be the name of a predefined module or a (DI annotated) | |
61 | - * function that will be invoked by the injector as a config block. | |
62 | - * @param config an object for defining configuration options for the application. The following keys are supported: | |
63 | - * - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code. | |
64 | - */ | |
65 | - bootstrap(element: string|Element|JQuery|Document, modules?: (string|Function|any[])[], config?: IAngularBootstrapConfig): auto.IInjectorService; | |
66 | - | |
67 | - /** | |
68 | - * Creates a deep copy of source, which should be an object or an array. | |
69 | - * | |
70 | - * - If no destination is supplied, a copy of the object or array is created. | |
71 | - * - If a destination is provided, all of its elements (for array) or properties (for objects) are deleted and then all elements/properties from the source are copied to it. | |
72 | - * - If source is not an object or array (inc. null and undefined), source is returned. | |
73 | - * - If source is identical to 'destination' an exception will be thrown. | |
74 | - * | |
75 | - * @param source The source that will be used to make a copy. Can be any type, including primitives, null, and undefined. | |
76 | - * @param destination Destination into which the source is copied. If provided, must be of the same type as source. | |
77 | - */ | |
78 | - copy<T>(source: T, destination?: T): T; | |
79 | - | |
80 | - /** | |
81 | - * Wraps a raw DOM element or HTML string as a jQuery element. | |
82 | - * | |
83 | - * If jQuery is available, angular.element is an alias for the jQuery function. If jQuery is not available, angular.element delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite." | |
84 | - */ | |
85 | - element: IAugmentedJQueryStatic; | |
86 | - equals(value1: any, value2: any): boolean; | |
87 | - extend(destination: any, ...sources: any[]): any; | |
88 | - | |
89 | - /** | |
90 | - * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional. | |
91 | - * | |
92 | - * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method. | |
93 | - * | |
94 | - * @param obj Object to iterate over. | |
95 | - * @param iterator Iterator function. | |
96 | - * @param context Object to become context (this) for the iterator function. | |
97 | - */ | |
98 | - forEach<T>(obj: T[], iterator: (value: T, key: number) => any, context?: any): any; | |
99 | - /** | |
100 | - * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional. | |
101 | - * | |
102 | - * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method. | |
103 | - * | |
104 | - * @param obj Object to iterate over. | |
105 | - * @param iterator Iterator function. | |
106 | - * @param context Object to become context (this) for the iterator function. | |
107 | - */ | |
108 | - forEach<T>(obj: { [index: string]: T; }, iterator: (value: T, key: string) => any, context?: any): any; | |
109 | - /** | |
110 | - * Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key), where value is the value of an object property or an array element and key is the object property key or array element index. Specifying a context for the function is optional. | |
111 | - * | |
112 | - * It is worth noting that .forEach does not iterate over inherited properties because it filters using the hasOwnProperty method. | |
113 | - * | |
114 | - * @param obj Object to iterate over. | |
115 | - * @param iterator Iterator function. | |
116 | - * @param context Object to become context (this) for the iterator function. | |
117 | - */ | |
118 | - forEach(obj: any, iterator: (value: any, key: any) => any, context?: any): any; | |
119 | - | |
120 | - fromJson(json: string): any; | |
121 | - identity<T>(arg?: T): T; | |
122 | - injector(modules?: any[], strictDi?: boolean): auto.IInjectorService; | |
123 | - isArray(value: any): boolean; | |
124 | - isDate(value: any): boolean; | |
125 | - isDefined(value: any): boolean; | |
126 | - isElement(value: any): boolean; | |
127 | - isFunction(value: any): boolean; | |
128 | - isNumber(value: any): boolean; | |
129 | - isObject(value: any): boolean; | |
130 | - isString(value: any): boolean; | |
131 | - isUndefined(value: any): boolean; | |
132 | - lowercase(str: string): string; | |
133 | - | |
134 | - /** | |
135 | - * Deeply extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.merge({}, object1, object2). | |
136 | - * | |
137 | - * Unlike extend(), merge() recursively descends into object properties of source objects, performing a deep copy. | |
138 | - * | |
139 | - * @param dst Destination object. | |
140 | - * @param src Source object(s). | |
141 | - */ | |
142 | - merge(dst: any, ...src: any[]): any; | |
143 | - | |
144 | - /** | |
145 | - * The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism. | |
146 | - * | |
147 | - * When passed two or more arguments, a new module is created. If passed only one argument, an existing module (the name passed as the first argument to module) is retrieved. | |
148 | - * | |
149 | - * @param name The name of the module to create or retrieve. | |
150 | - * @param requires The names of modules this module depends on. If specified then new module is being created. If unspecified then the module is being retrieved for further configuration. | |
151 | - * @param configFn Optional configuration function for the module. | |
152 | - */ | |
153 | - module( | |
154 | - name: string, | |
155 | - requires?: string[], | |
156 | - configFn?: Function): IModule; | |
157 | - | |
158 | - noop(...args: any[]): void; | |
159 | - reloadWithDebugInfo(): void; | |
160 | - toJson(obj: any, pretty?: boolean): string; | |
161 | - uppercase(str: string): string; | |
162 | - version: { | |
163 | - full: string; | |
164 | - major: number; | |
165 | - minor: number; | |
166 | - dot: number; | |
167 | - codeName: string; | |
168 | - }; | |
169 | - | |
170 | - /** | |
171 | - * If window.name contains prefix NG_DEFER_BOOTSTRAP! when angular.bootstrap is called, the bootstrap process will be paused until angular.resumeBootstrap() is called. | |
172 | - * @param extraModules An optional array of modules that should be added to the original list of modules that the app was about to be bootstrapped with. | |
173 | - */ | |
174 | - resumeBootstrap?(extraModules?: string[]): ng.auto.IInjectorService; | |
175 | - } | |
176 | - | |
177 | - /////////////////////////////////////////////////////////////////////////// | |
178 | - // Module | |
179 | - // see http://docs.angularjs.org/api/angular.Module | |
180 | - /////////////////////////////////////////////////////////////////////////// | |
181 | - interface IModule { | |
182 | - animation(name: string, animationFactory: Function): IModule; | |
183 | - animation(name: string, inlineAnnotatedFunction: any[]): IModule; | |
184 | - animation(object: Object): IModule; | |
185 | - /** | |
186 | - * Use this method to register a component. | |
187 | - * | |
188 | - * @param name The name of the component. | |
189 | - * @param options A definition object passed into the component. | |
190 | - */ | |
191 | - component(name: string, options: IComponentOptions): IModule; | |
192 | - /** | |
193 | - * Use this method to register work which needs to be performed on module loading. | |
194 | - * | |
195 | - * @param configFn Execute this function on module load. Useful for service configuration. | |
196 | - */ | |
197 | - config(configFn: Function): IModule; | |
198 | - /** | |
199 | - * Use this method to register work which needs to be performed on module loading. | |
200 | - * | |
201 | - * @param inlineAnnotatedFunction Execute this function on module load. Useful for service configuration. | |
202 | - */ | |
203 | - config(inlineAnnotatedFunction: any[]): IModule; | |
204 | - config(object: Object): IModule; | |
205 | - /** | |
206 | - * Register a constant service, such as a string, a number, an array, an object or a function, with the $injector. Unlike value it can be injected into a module configuration function (see config) and it cannot be overridden by an Angular decorator. | |
207 | - * | |
208 | - * @param name The name of the constant. | |
209 | - * @param value The constant value. | |
210 | - */ | |
211 | - constant(name: string, value: any): IModule; | |
212 | - constant(object: Object): IModule; | |
213 | - /** | |
214 | - * The $controller service is used by Angular to create new controllers. | |
215 | - * | |
216 | - * This provider allows controller registration via the register method. | |
217 | - * | |
218 | - * @param name Controller name, or an object map of controllers where the keys are the names and the values are the constructors. | |
219 | - * @param controllerConstructor Controller constructor fn (optionally decorated with DI annotations in the array notation). | |
220 | - */ | |
221 | - controller(name: string, controllerConstructor: Function): IModule; | |
222 | - /** | |
223 | - * The $controller service is used by Angular to create new controllers. | |
224 | - * | |
225 | - * This provider allows controller registration via the register method. | |
226 | - * | |
227 | - * @param name Controller name, or an object map of controllers where the keys are the names and the values are the constructors. | |
228 | - * @param controllerConstructor Controller constructor fn (optionally decorated with DI annotations in the array notation). | |
229 | - */ | |
230 | - controller(name: string, inlineAnnotatedConstructor: any[]): IModule; | |
231 | - controller(object: Object): IModule; | |
232 | - /** | |
233 | - * Register a new directive with the compiler. | |
234 | - * | |
235 | - * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind) | |
236 | - * @param directiveFactory An injectable directive factory function. | |
237 | - */ | |
238 | - directive(name: string, directiveFactory: IDirectiveFactory): IModule; | |
239 | - /** | |
240 | - * Register a new directive with the compiler. | |
241 | - * | |
242 | - * @param name Name of the directive in camel-case (i.e. ngBind which will match as ng-bind) | |
243 | - * @param directiveFactory An injectable directive factory function. | |
244 | - */ | |
245 | - directive(name: string, inlineAnnotatedFunction: any[]): IModule; | |
246 | - directive(object: Object): IModule; | |
247 | - /** | |
248 | - * Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider. | |
249 | - * | |
250 | - * @param name The name of the instance. | |
251 | - * @param $getFn The $getFn for the instance creation. Internally this is a short hand for $provide.provider(name, {$get: $getFn}). | |
252 | - */ | |
253 | - factory(name: string, $getFn: Function): IModule; | |
254 | - /** | |
255 | - * Register a service factory, which will be called to return the service instance. This is short for registering a service where its provider consists of only a $get property, which is the given service factory function. You should use $provide.factory(getFn) if you do not need to configure your service in a provider. | |
256 | - * | |
257 | - * @param name The name of the instance. | |
258 | - * @param inlineAnnotatedFunction The $getFn for the instance creation. Internally this is a short hand for $provide.provider(name, {$get: $getFn}). | |
259 | - */ | |
260 | - factory(name: string, inlineAnnotatedFunction: any[]): IModule; | |
261 | - factory(object: Object): IModule; | |
262 | - filter(name: string, filterFactoryFunction: Function): IModule; | |
263 | - filter(name: string, inlineAnnotatedFunction: any[]): IModule; | |
264 | - filter(object: Object): IModule; | |
265 | - provider(name: string, serviceProviderFactory: IServiceProviderFactory): IModule; | |
266 | - provider(name: string, serviceProviderConstructor: IServiceProviderClass): IModule; | |
267 | - provider(name: string, inlineAnnotatedConstructor: any[]): IModule; | |
268 | - provider(name: string, providerObject: IServiceProvider): IModule; | |
269 | - provider(object: Object): IModule; | |
270 | - /** | |
271 | - * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests. | |
272 | - */ | |
273 | - run(initializationFunction: Function): IModule; | |
274 | - /** | |
275 | - * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests. | |
276 | - */ | |
277 | - run(inlineAnnotatedFunction: any[]): IModule; | |
278 | - service(name: string, serviceConstructor: Function): IModule; | |
279 | - service(name: string, inlineAnnotatedConstructor: any[]): IModule; | |
280 | - service(object: Object): IModule; | |
281 | - /** | |
282 | - * Register a value service with the $injector, such as a string, a number, an array, an object or a function. This is short for registering a service where its provider's $get property is a factory function that takes no arguments and returns the value service. | |
283 | - | |
284 | - Value services are similar to constant services, except that they cannot be injected into a module configuration function (see config) but they can be overridden by an Angular decorator. | |
285 | - * | |
286 | - * @param name The name of the instance. | |
287 | - * @param value The value. | |
288 | - */ | |
289 | - value(name: string, value: any): IModule; | |
290 | - value(object: Object): IModule; | |
291 | - | |
292 | - /** | |
293 | - * Register a service decorator with the $injector. A service decorator intercepts the creation of a service, allowing it to override or modify the behaviour of the service. The object returned by the decorator may be the original service, or a new service object which replaces or wraps and delegates to the original service. | |
294 | - * @param name The name of the service to decorate | |
295 | - * @param decorator This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments: $delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to. | |
296 | - */ | |
297 | - decorator(name:string, decoratorConstructor: Function): IModule; | |
298 | - decorator(name:string, inlineAnnotatedConstructor: any[]): IModule; | |
299 | - | |
300 | - // Properties | |
301 | - name: string; | |
302 | - requires: string[]; | |
303 | - } | |
304 | - | |
305 | - /////////////////////////////////////////////////////////////////////////// | |
306 | - // Attributes | |
307 | - // see http://docs.angularjs.org/api/ng.$compile.directive.Attributes | |
308 | - /////////////////////////////////////////////////////////////////////////// | |
309 | - interface IAttributes { | |
310 | - /** | |
311 | - * this is necessary to be able to access the scoped attributes. it's not very elegant | |
312 | - * because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way | |
313 | - * this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656 | |
314 | - */ | |
315 | - [name: string]: any; | |
316 | - | |
317 | - /** | |
318 | - * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-) to its normalized, camelCase form. | |
319 | - * | |
320 | - * Also there is special case for Moz prefix starting with upper case letter. | |
321 | - * | |
322 | - * For further information check out the guide on @see https://docs.angularjs.org/guide/directive#matching-directives | |
323 | - */ | |
324 | - $normalize(name: string): string; | |
325 | - | |
326 | - /** | |
327 | - * Adds the CSS class value specified by the classVal parameter to the | |
328 | - * element. If animations are enabled then an animation will be triggered | |
329 | - * for the class addition. | |
330 | - */ | |
331 | - $addClass(classVal: string): void; | |
332 | - | |
333 | - /** | |
334 | - * Removes the CSS class value specified by the classVal parameter from the | |
335 | - * element. If animations are enabled then an animation will be triggered for | |
336 | - * the class removal. | |
337 | - */ | |
338 | - $removeClass(classVal: string): void; | |
339 | - | |
340 | - /** | |
341 | - * Set DOM element attribute value. | |
342 | - */ | |
343 | - $set(key: string, value: any): void; | |
344 | - | |
345 | - /** | |
346 | - * Observes an interpolated attribute. | |
347 | - * The observer function will be invoked once during the next $digest | |
348 | - * following compilation. The observer is then invoked whenever the | |
349 | - * interpolated value changes. | |
350 | - */ | |
351 | - $observe<T>(name: string, fn: (value?: T) => any): Function; | |
352 | - | |
353 | - /** | |
354 | - * A map of DOM element attribute names to the normalized name. This is needed | |
355 | - * to do reverse lookup from normalized name back to actual name. | |
356 | - */ | |
357 | - $attr: Object; | |
358 | - } | |
359 | - | |
360 | - /** | |
361 | - * form.FormController - type in module ng | |
362 | - * see https://docs.angularjs.org/api/ng/type/form.FormController | |
363 | - */ | |
364 | - interface IFormController { | |
365 | - | |
366 | - /** | |
367 | - * Indexer which should return ng.INgModelController for most properties but cannot because of "All named properties must be assignable to string indexer type" constraint - see https://github.com/Microsoft/TypeScript/issues/272 | |
368 | - */ | |
369 | - [name: string]: any; | |
370 | - | |
371 | - $pristine: boolean; | |
372 | - $dirty: boolean; | |
373 | - $valid: boolean; | |
374 | - $invalid: boolean; | |
375 | - $submitted: boolean; | |
376 | - $error: any; | |
377 | - $addControl(control: INgModelController): void; | |
378 | - $removeControl(control: INgModelController): void; | |
379 | - $setValidity(validationErrorKey: string, isValid: boolean, control: INgModelController): void; | |
380 | - $setDirty(): void; | |
381 | - $setPristine(): void; | |
382 | - $commitViewValue(): void; | |
383 | - $rollbackViewValue(): void; | |
384 | - $setSubmitted(): void; | |
385 | - $setUntouched(): void; | |
386 | - } | |
387 | - | |
388 | - /////////////////////////////////////////////////////////////////////////// | |
389 | - // NgModelController | |
390 | - // see http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController | |
391 | - /////////////////////////////////////////////////////////////////////////// | |
392 | - interface INgModelController { | |
393 | - $render(): void; | |
394 | - $setValidity(validationErrorKey: string, isValid: boolean): void; | |
395 | - // Documentation states viewValue and modelValue to be a string but other | |
396 | - // types do work and it's common to use them. | |
397 | - $setViewValue(value: any, trigger?: string): void; | |
398 | - $setPristine(): void; | |
399 | - $setDirty(): void; | |
400 | - $validate(): void; | |
401 | - $setTouched(): void; | |
402 | - $setUntouched(): void; | |
403 | - $rollbackViewValue(): void; | |
404 | - $commitViewValue(): void; | |
405 | - $isEmpty(value: any): boolean; | |
406 | - | |
407 | - $viewValue: any; | |
408 | - | |
409 | - $modelValue: any; | |
410 | - | |
411 | - $parsers: IModelParser[]; | |
412 | - $formatters: IModelFormatter[]; | |
413 | - $viewChangeListeners: IModelViewChangeListener[]; | |
414 | - $error: any; | |
415 | - $name: string; | |
416 | - | |
417 | - $touched: boolean; | |
418 | - $untouched: boolean; | |
419 | - | |
420 | - $validators: IModelValidators; | |
421 | - $asyncValidators: IAsyncModelValidators; | |
422 | - | |
423 | - $pending: any; | |
424 | - $pristine: boolean; | |
425 | - $dirty: boolean; | |
426 | - $valid: boolean; | |
427 | - $invalid: boolean; | |
428 | - } | |
429 | - | |
430 | - interface IModelValidators { | |
431 | - /** | |
432 | - * viewValue is any because it can be an object that is called in the view like $viewValue.name:$viewValue.subName | |
433 | - */ | |
434 | - [index: string]: (modelValue: any, viewValue: any) => boolean; | |
435 | - } | |
436 | - | |
437 | - interface IAsyncModelValidators { | |
438 | - [index: string]: (modelValue: any, viewValue: any) => IPromise<any>; | |
439 | - } | |
440 | - | |
441 | - interface IModelParser { | |
442 | - (value: any): any; | |
443 | - } | |
444 | - | |
445 | - interface IModelFormatter { | |
446 | - (value: any): any; | |
447 | - } | |
448 | - | |
449 | - interface IModelViewChangeListener { | |
450 | - (): void; | |
451 | - } | |
452 | - | |
453 | - /** | |
454 | - * $rootScope - $rootScopeProvider - service in module ng | |
455 | - * see https://docs.angularjs.org/api/ng/type/$rootScope.Scope and https://docs.angularjs.org/api/ng/service/$rootScope | |
456 | - */ | |
457 | - interface IRootScopeService { | |
458 | - [index: string]: any; | |
459 | - | |
460 | - $apply(): any; | |
461 | - $apply(exp: string): any; | |
462 | - $apply(exp: (scope: IScope) => any): any; | |
463 | - | |
464 | - $applyAsync(): any; | |
465 | - $applyAsync(exp: string): any; | |
466 | - $applyAsync(exp: (scope: IScope) => any): any; | |
467 | - | |
468 | - /** | |
469 | - * Dispatches an event name downwards to all child scopes (and their children) notifying the registered $rootScope.Scope listeners. | |
470 | - * | |
471 | - * The event life cycle starts at the scope on which $broadcast was called. All listeners listening for name event on this scope get notified. Afterwards, the event propagates to all direct and indirect scopes of the current scope and calls all registered listeners along the way. The event cannot be canceled. | |
472 | - * | |
473 | - * Any exception emitted from the listeners will be passed onto the $exceptionHandler service. | |
474 | - * | |
475 | - * @param name Event name to broadcast. | |
476 | - * @param args Optional one or more arguments which will be passed onto the event listeners. | |
477 | - */ | |
478 | - $broadcast(name: string, ...args: any[]): IAngularEvent; | |
479 | - $destroy(): void; | |
480 | - $digest(): void; | |
481 | - /** | |
482 | - * Dispatches an event name upwards through the scope hierarchy notifying the registered $rootScope.Scope listeners. | |
483 | - * | |
484 | - * The event life cycle starts at the scope on which $emit was called. All listeners listening for name event on this scope get notified. Afterwards, the event traverses upwards toward the root scope and calls all registered listeners along the way. The event will stop propagating if one of the listeners cancels it. | |
485 | - * | |
486 | - * Any exception emitted from the listeners will be passed onto the $exceptionHandler service. | |
487 | - * | |
488 | - * @param name Event name to emit. | |
489 | - * @param args Optional one or more arguments which will be passed onto the event listeners. | |
490 | - */ | |
491 | - $emit(name: string, ...args: any[]): IAngularEvent; | |
492 | - | |
493 | - $eval(): any; | |
494 | - $eval(expression: string, locals?: Object): any; | |
495 | - $eval(expression: (scope: IScope) => any, locals?: Object): any; | |
496 | - | |
497 | - $evalAsync(): void; | |
498 | - $evalAsync(expression: string): void; | |
499 | - $evalAsync(expression: (scope: IScope) => any): void; | |
500 | - | |
501 | - // Defaults to false by the implementation checking strategy | |
502 | - $new(isolate?: boolean, parent?: IScope): IScope; | |
503 | - | |
504 | - /** | |
505 | - * Listens on events of a given type. See $emit for discussion of event life cycle. | |
506 | - * | |
507 | - * The event listener function format is: function(event, args...). | |
508 | - * | |
509 | - * @param name Event name to listen on. | |
510 | - * @param listener Function to call when the event is emitted. | |
511 | - */ | |
512 | - $on(name: string, listener: (event: IAngularEvent, ...args: any[]) => any): Function; | |
513 | - | |
514 | - $watch(watchExpression: string, listener?: string, objectEquality?: boolean): Function; | |
515 | - $watch<T>(watchExpression: string, listener?: (newValue: T, oldValue: T, scope: IScope) => any, objectEquality?: boolean): Function; | |
516 | - $watch(watchExpression: (scope: IScope) => any, listener?: string, objectEquality?: boolean): Function; | |
517 | - $watch<T>(watchExpression: (scope: IScope) => T, listener?: (newValue: T, oldValue: T, scope: IScope) => any, objectEquality?: boolean): Function; | |
518 | - | |
519 | - $watchCollection<T>(watchExpression: string, listener: (newValue: T, oldValue: T, scope: IScope) => any): Function; | |
520 | - $watchCollection<T>(watchExpression: (scope: IScope) => T, listener: (newValue: T, oldValue: T, scope: IScope) => any): Function; | |
521 | - | |
522 | - $watchGroup(watchExpressions: any[], listener: (newValue: any, oldValue: any, scope: IScope) => any): Function; | |
523 | - $watchGroup(watchExpressions: { (scope: IScope): any }[], listener: (newValue: any, oldValue: any, scope: IScope) => any): Function; | |
524 | - | |
525 | - $parent: IScope; | |
526 | - $root: IRootScopeService; | |
527 | - $id: number; | |
528 | - | |
529 | - // Hidden members | |
530 | - $$isolateBindings: any; | |
531 | - $$phase: any; | |
532 | - } | |
533 | - | |
534 | - interface IScope extends IRootScopeService { } | |
535 | - | |
536 | - /** | |
537 | - * $scope for ngRepeat directive. | |
538 | - * see https://docs.angularjs.org/api/ng/directive/ngRepeat | |
539 | - */ | |
540 | - interface IRepeatScope extends IScope { | |
541 | - | |
542 | - /** | |
543 | - * iterator offset of the repeated element (0..length-1). | |
544 | - */ | |
545 | - $index: number; | |
546 | - | |
547 | - /** | |
548 | - * true if the repeated element is first in the iterator. | |
549 | - */ | |
550 | - $first: boolean; | |
551 | - | |
552 | - /** | |
553 | - * true if the repeated element is between the first and last in the iterator. | |
554 | - */ | |
555 | - $middle: boolean; | |
556 | - | |
557 | - /** | |
558 | - * true if the repeated element is last in the iterator. | |
559 | - */ | |
560 | - $last: boolean; | |
561 | - | |
562 | - /** | |
563 | - * true if the iterator position $index is even (otherwise false). | |
564 | - */ | |
565 | - $even: boolean; | |
566 | - | |
567 | - /** | |
568 | - * true if the iterator position $index is odd (otherwise false). | |
569 | - */ | |
570 | - $odd: boolean; | |
571 | - | |
572 | - } | |
573 | - | |
574 | - interface IAngularEvent { | |
575 | - /** | |
576 | - * the scope on which the event was $emit-ed or $broadcast-ed. | |
577 | - */ | |
578 | - targetScope: IScope; | |
579 | - /** | |
580 | - * the scope that is currently handling the event. Once the event propagates through the scope hierarchy, this property is set to null. | |
581 | - */ | |
582 | - currentScope: IScope; | |
583 | - /** | |
584 | - * name of the event. | |
585 | - */ | |
586 | - name: string; | |
587 | - /** | |
588 | - * calling stopPropagation function will cancel further event propagation (available only for events that were $emit-ed). | |
589 | - */ | |
590 | - stopPropagation?: Function; | |
591 | - /** | |
592 | - * calling preventDefault sets defaultPrevented flag to true. | |
593 | - */ | |
594 | - preventDefault: Function; | |
595 | - /** | |
596 | - * true if preventDefault was called. | |
597 | - */ | |
598 | - defaultPrevented: boolean; | |
599 | - } | |
600 | - | |
601 | - /////////////////////////////////////////////////////////////////////////// | |
602 | - // WindowService | |
603 | - // see http://docs.angularjs.org/api/ng.$window | |
604 | - /////////////////////////////////////////////////////////////////////////// | |
605 | - interface IWindowService extends Window { | |
606 | - [key: string]: any; | |
607 | - } | |
608 | - | |
609 | - /////////////////////////////////////////////////////////////////////////// | |
610 | - // BrowserService | |
611 | - // TODO undocumented, so we need to get it from the source code | |
612 | - /////////////////////////////////////////////////////////////////////////// | |
613 | - interface IBrowserService { | |
614 | - defer: angular.ITimeoutService; | |
615 | - [key: string]: any; | |
616 | - } | |
617 | - | |
618 | - /////////////////////////////////////////////////////////////////////////// | |
619 | - // TimeoutService | |
620 | - // see http://docs.angularjs.org/api/ng.$timeout | |
621 | - /////////////////////////////////////////////////////////////////////////// | |
622 | - interface ITimeoutService { | |
623 | - (delay?: number, invokeApply?: boolean): IPromise<void>; | |