@angular-wave/angular.ts 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/angular.d.ts +4 -19
- package/@types/animations/animate.d.ts +2 -2
- package/@types/animations/animation.d.ts +1 -1
- package/@types/core/compile/attributes.d.ts +1 -1
- package/@types/core/compile/compile.d.ts +2 -2
- package/@types/core/controller/controller.d.ts +1 -1
- package/@types/core/controller/interface.d.ts +6 -0
- package/@types/core/di/ng-module.d.ts +27 -26
- package/@types/core/filter/filter.d.ts +5 -5
- package/@types/core/interpolate/interface.d.ts +13 -0
- package/@types/core/interpolate/interpolate.d.ts +1 -13
- package/@types/core/scope/scope.d.ts +4 -1
- package/@types/directive/http/http.d.ts +16 -16
- package/@types/directive/http/interface.d.ts +27 -0
- package/@types/directive/include/include.d.ts +4 -4
- package/@types/directive/inject/inject.d.ts +12 -0
- package/@types/directive/model/model.d.ts +1 -1
- package/@types/directive/script/script.d.ts +2 -2
- package/@types/directive/setter/setter.d.ts +4 -4
- package/@types/filters/filter.d.ts +2 -2
- package/@types/filters/filters.d.ts +2 -2
- package/@types/filters/interface.d.ts +8 -0
- package/@types/filters/limit-to.d.ts +2 -2
- package/@types/filters/order-by.d.ts +2 -2
- package/@types/index.d.ts +84 -1
- package/@types/interface.d.ts +105 -82
- package/@types/router/state/interface.d.ts +8 -8
- package/@types/router/state-filters.d.ts +4 -4
- package/@types/router/template-factory.d.ts +6 -6
- package/@types/router/transition/hook-builder.d.ts +5 -2
- package/@types/router/transition/hook-registry.d.ts +11 -2
- package/@types/router/transition/transition-service.d.ts +6 -2
- package/@types/router/transition/transition.d.ts +2 -2
- package/@types/router/view/view.d.ts +1 -8
- package/@types/router/view-scroll.d.ts +4 -2
- package/@types/services/{anchor-scroll.d.ts → anchor-scroll/anchor-scroll.d.ts} +2 -2
- package/@types/services/exception/exception-handler.d.ts +2 -2
- package/@types/services/exception/interface.d.ts +1 -1
- package/@types/services/http/http.d.ts +40 -2
- package/@types/services/http/interface.d.ts +11 -0
- package/@types/services/location/location.d.ts +1 -4
- package/@types/services/sce/sce.d.ts +3 -4
- package/@types/services/template-cache/template-cache.d.ts +4 -4
- package/@types/services/template-request/interface.d.ts +22 -0
- package/@types/services/{template-request.d.ts → template-request/template-request.d.ts} +4 -7
- package/@types/shared/common.d.ts +8 -69
- package/@types/shared/hof.d.ts +7 -7
- package/dist/angular-ts.esm.js +509 -569
- package/dist/angular-ts.umd.js +509 -569
- package/dist/angular-ts.umd.min.js +1 -1
- package/{src/filters → docs/content/docs/filter}/filter.md +18 -9
- package/{src/filters → docs/content/docs/filter}/json.md +6 -3
- package/docs/content/docs/filter/limit-to.md +30 -0
- package/docs/content/docs/filter/order-by.md +123 -0
- package/docs/content/docs/provider/sceProvider.md +194 -0
- package/docs/content/docs/provider/templateRequestProvider.md +5 -0
- package/docs/content/docs/service/compile.md +5 -0
- package/docs/content/docs/service/controller.md +5 -0
- package/docs/content/docs/service/http.md +161 -0
- package/docs/content/docs/service/interpolation.md +5 -0
- package/docs/content/docs/service/log.md +1 -1
- package/docs/content/docs/service/parse.md +5 -0
- package/docs/content/docs/service/rootElement.md +5 -0
- package/docs/content/docs/service/rootScope.md +5 -0
- package/docs/content/docs/service/sce.md +194 -0
- package/docs/content/docs/service/templateRequest.md +5 -0
- package/docs/content/docs/values/_index.md +4 -0
- package/docs/content/docs/values/document.md +29 -0
- package/docs/content/docs/values/window.md +29 -0
- package/docs/layouts/shortcodes/version.html +1 -1
- package/docs/static/examples/document/document.html +3 -0
- package/docs/static/examples/i18n/i18n.html +77 -0
- package/docs/static/examples/window/window.html +4 -0
- package/docs/static/typedoc/assets/hierarchy.js +1 -1
- package/docs/static/typedoc/assets/highlight.css +0 -49
- package/docs/static/typedoc/assets/navigation.js +1 -1
- package/docs/static/typedoc/assets/search.js +1 -1
- package/docs/static/typedoc/classes/PubSubProvider.html +3 -2
- package/docs/static/typedoc/classes/TemplateCacheProvider.html +1 -1
- package/docs/static/typedoc/hierarchy.html +1 -1
- package/docs/static/typedoc/index.html +1 -1
- package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +1 -1
- package/docs/static/typedoc/interfaces/RequestConfig.html +1 -1
- package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +1 -1
- package/docs/static/typedoc/interfaces/ServiceProvider.html +3 -3
- package/docs/static/typedoc/types/HttpParamSerializer.html +2 -0
- package/docs/static/typedoc/types/{Expression.html → HttpParams.html} +1 -5
- package/legacy.d.ts +0 -921
- package/package.json +1 -1
- package/src/angular.js +2 -9
- package/src/animations/animate.js +1 -1
- package/src/animations/animation.js +7 -7
- package/src/core/compile/compile.js +3 -2
- package/src/core/controller/controller.js +10 -6
- package/src/core/controller/interface.ts +6 -0
- package/src/core/di/injector.js +1 -1
- package/src/core/di/internal-injector.js +2 -0
- package/src/core/di/ng-module.js +16 -13
- package/src/core/filter/filter.js +3 -3
- package/src/core/interpolate/interface.ts +14 -0
- package/src/core/interpolate/interpolate.js +7 -5
- package/src/core/scope/scope.js +4 -1
- package/src/directive/http/delete.spec.js +5 -8
- package/src/directive/http/http.js +16 -16
- package/src/directive/http/interface.ts +36 -0
- package/src/directive/http/put.spec.js +5 -8
- package/src/directive/include/include.js +2 -2
- package/src/{services/http-backend/http-backend.html → directive/inject/inject.html} +1 -4
- package/src/directive/inject/inject.js +35 -0
- package/src/directive/inject/inject.spec.js +108 -0
- package/src/{services/http-backend/http-backend.test.js → directive/inject/inject.test.js} +1 -1
- package/src/directive/script/script.js +1 -1
- package/src/directive/setter/setter.js +2 -2
- package/src/filters/filter.js +1 -1
- package/src/filters/filters.js +1 -1
- package/src/filters/interface.ts +9 -0
- package/src/filters/limit-to.js +1 -1
- package/src/filters/order-by.js +1 -1
- package/src/index.ts +96 -0
- package/src/injection-tokens.js +4 -1
- package/src/interface.ts +102 -93
- package/src/ng.js +6 -4
- package/src/ng.spec.js +12 -0
- package/src/router/directives/state-directives.js +1 -1
- package/src/router/directives/view-directive.spec.js +19 -35
- package/src/router/state/interface.ts +8 -8
- package/src/router/state/state-builder.js +4 -4
- package/src/router/state/state-registry.js +7 -2
- package/src/router/state/state-service.js +2 -14
- package/src/router/state-filters.js +2 -2
- package/src/router/template-factory.js +3 -3
- package/src/router/template-factory.spec.js +10 -19
- package/src/router/transition/hook-builder.js +5 -1
- package/src/router/transition/hook-registry.js +12 -3
- package/src/router/transition/transition-service.js +4 -9
- package/src/router/transition/transition.js +3 -2
- package/src/router/url/url-service.js +2 -2
- package/src/router/view/view.js +3 -15
- package/src/router/view-scroll.js +2 -2
- package/src/services/{anchor-scroll.js → anchor-scroll/anchor-scroll.js} +4 -4
- package/src/services/exception/exception-handler.js +1 -1
- package/src/services/exception/interface.ts +1 -1
- package/src/services/http/http.js +200 -13
- package/src/services/http/http.spec.js +388 -9
- package/src/services/http/interface.ts +13 -0
- package/src/services/location/location.js +1 -1
- package/src/services/sce/sce.js +18 -13
- package/src/services/template-cache/template-cache.js +2 -2
- package/src/services/template-request/interface.ts +23 -0
- package/src/services/{template-request.js → template-request/template-request.js} +6 -6
- package/src/shared/common.js +7 -80
- package/src/shared/hof.js +23 -17
- package/typedoc.json +1 -1
- package/@types/services/cookie-reader.d.ts +0 -4
- package/@types/services/http-backend/http-backend.d.ts +0 -58
- package/@types/services/template-cache/interface.d.ts +0 -10
- package/docs/static/typedoc/interfaces/ChangesObject.html +0 -6
- package/docs/static/typedoc/interfaces/ComponentOptions.html +0 -16
- package/docs/static/typedoc/interfaces/Controller.html +0 -12
- package/docs/static/typedoc/interfaces/Directive.html +0 -37
- package/docs/static/typedoc/interfaces/DirectivePrePost.html +0 -4
- package/docs/static/typedoc/interfaces/NgModelController.html +0 -30
- package/docs/static/typedoc/interfaces/NgModelOptions.html +0 -16
- package/docs/static/typedoc/interfaces/Provider.html +0 -34
- package/docs/static/typedoc/interfaces/TemplateCache.html +0 -7
- package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +0 -8
- package/docs/static/typedoc/types/AnnotatedDirectiveFactory.html +0 -1
- package/docs/static/typedoc/types/AnnotatedFactory.html +0 -8
- package/docs/static/typedoc/types/CloneAttachFunction.html +0 -2
- package/docs/static/typedoc/types/ControllerConstructor.html +0 -2
- package/docs/static/typedoc/types/DirectiveCompileFn.html +0 -2
- package/docs/static/typedoc/types/DirectiveController.html +0 -2
- package/docs/static/typedoc/types/DirectiveFactory.html +0 -1
- package/docs/static/typedoc/types/DirectiveFactoryFn.html +0 -1
- package/docs/static/typedoc/types/DirectiveLinkFn.html +0 -2
- package/docs/static/typedoc/types/ExpandoStore.html +0 -2
- package/docs/static/typedoc/types/FilterFactory.html +0 -2
- package/docs/static/typedoc/types/FilterFn.html +0 -2
- package/docs/static/typedoc/types/Injectable.html +0 -4
- package/docs/static/typedoc/types/InjectableClass.html +0 -1
- package/docs/static/typedoc/types/InjectableFactory.html +0 -1
- package/docs/static/typedoc/types/OnChangesObject.html +0 -2
- package/docs/static/typedoc/types/SwapModeType.html +0 -2
- package/docs/static/typedoc/types/TController.html +0 -2
- package/docs/static/typedoc/variables/SwapMode.html +0 -11
- package/src/filters/limit-to.md +0 -19
- package/src/filters/order-by.md +0 -83
- package/src/router/state/README.md +0 -21
- package/src/services/cookie-reader.js +0 -48
- package/src/services/http/http.md +0 -413
- package/src/services/http-backend/http-backend.js +0 -158
- package/src/services/http-backend/http-backend.spec.js +0 -389
- package/src/services/sce/sce.md +0 -300
- package/src/services/template-cache/interface.ts +0 -10
- /package/src/services/{anchor-scroll.html → anchor-scroll/anchor-scroll.html} +0 -0
package/legacy.d.ts
CHANGED
|
@@ -1,138 +1,5 @@
|
|
|
1
|
-
declare var angular: angular.IAngularStatic;
|
|
2
|
-
|
|
3
|
-
// Support for painless dependency injection
|
|
4
|
-
declare global {
|
|
5
|
-
interface Function {
|
|
6
|
-
$inject?: readonly string[] | undefined;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export as namespace angular;
|
|
11
|
-
export as namespace ng;
|
|
12
|
-
|
|
13
|
-
// Support AMD require
|
|
14
|
-
export = angular;
|
|
15
|
-
|
|
16
|
-
import ng = angular;
|
|
17
|
-
|
|
18
|
-
///////////////////////////////////////////////////////////////////////////////
|
|
19
|
-
// ng module (angular.js)
|
|
20
|
-
///////////////////////////////////////////////////////////////////////////////
|
|
21
1
|
declare namespace angular {
|
|
22
|
-
type Injectable<T extends Function> = T | Array<string | T>;
|
|
23
|
-
|
|
24
2
|
// not directly implemented, but ensures that constructed class implements $get
|
|
25
|
-
interface IServiceProviderClass {
|
|
26
|
-
new (...args: any[]): IServiceProvider;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interface IServiceProviderFactory {
|
|
30
|
-
(...args: any[]): IServiceProvider;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// All service providers extend this interface
|
|
34
|
-
interface IServiceProvider {
|
|
35
|
-
$get: any;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
interface IAngularBootstrapConfig {
|
|
39
|
-
strictDi?: boolean | undefined;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
///////////////////////////////////////////////////////////////////////////
|
|
43
|
-
// AngularStatic
|
|
44
|
-
// see http://docs.angularjs.org/api
|
|
45
|
-
///////////////////////////////////////////////////////////////////////////
|
|
46
|
-
interface IAngularStatic {
|
|
47
|
-
bind(context: any, fn: Function, ...args: any[]): Function;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Use this function to manually start up angular application.
|
|
51
|
-
*
|
|
52
|
-
* @param element DOM element which is the root of angular application.
|
|
53
|
-
* @param modules An array of modules to load into the application.
|
|
54
|
-
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
|
55
|
-
* function that will be invoked by the injector as a config block.
|
|
56
|
-
* @param config an object for defining configuration options for the application. The following keys are supported:
|
|
57
|
-
* - `strictDi`: disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code.
|
|
58
|
-
*/
|
|
59
|
-
bootstrap(
|
|
60
|
-
element: string | Element | JQuery | Document,
|
|
61
|
-
modules?: Array<string | Function | any[]>,
|
|
62
|
-
config?: IAngularBootstrapConfig,
|
|
63
|
-
): auto.IInjectorService;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Creates a deep copy of source, which should be an object or an array.
|
|
67
|
-
*
|
|
68
|
-
* - If no destination is supplied, a copy of the object or array is created.
|
|
69
|
-
* - 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.
|
|
70
|
-
* - If source is not an object or array (inc. null and undefined), source is returned.
|
|
71
|
-
* - If source is identical to 'destination' an exception will be thrown.
|
|
72
|
-
*
|
|
73
|
-
* @param source The source that will be used to make a copy. Can be any type, including primitives, null, and undefined.
|
|
74
|
-
* @param destination Destination into which the source is copied. If provided, must be of the same type as source.
|
|
75
|
-
*/
|
|
76
|
-
copy<T>(source: T, destination?: T): T;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Wraps a raw DOM element or HTML string as a jQuery element.
|
|
80
|
-
*
|
|
81
|
-
* 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."
|
|
82
|
-
*/
|
|
83
|
-
element: JQueryStatic;
|
|
84
|
-
/**
|
|
85
|
-
* Configure several aspects of error handling in AngularJS if used as a setter
|
|
86
|
-
* or return the current configuration if used as a getter
|
|
87
|
-
*/
|
|
88
|
-
errorHandlingConfig(): IErrorHandlingConfig;
|
|
89
|
-
errorHandlingConfig(config: IErrorHandlingConfig): void;
|
|
90
|
-
equals(value1: any, value2: any): boolean;
|
|
91
|
-
extend(destination: any, ...sources: any[]): any;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* 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.
|
|
95
|
-
*
|
|
96
|
-
* 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.
|
|
97
|
-
*
|
|
98
|
-
* @param name The name of the module to create or retrieve.
|
|
99
|
-
* @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.
|
|
100
|
-
* @param configFn Optional configuration function for the module.
|
|
101
|
-
*/
|
|
102
|
-
module(
|
|
103
|
-
name: string,
|
|
104
|
-
requires?: string[],
|
|
105
|
-
configFn?: Injectable<Function>,
|
|
106
|
-
): IModule;
|
|
107
|
-
|
|
108
|
-
noop(...args: any[]): void;
|
|
109
|
-
reloadWithDebugInfo(): void;
|
|
110
|
-
toJson(obj: any, pretty?: boolean | number): string;
|
|
111
|
-
version: {
|
|
112
|
-
full: string;
|
|
113
|
-
major: number;
|
|
114
|
-
minor: number;
|
|
115
|
-
dot: number;
|
|
116
|
-
codeName: string;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* If window.name contains prefix NG_DEFER_BOOTSTRAP! when angular.bootstrap is called, the bootstrap process will be paused until angular.resumeBootstrap() is called.
|
|
121
|
-
* @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.
|
|
122
|
-
*/
|
|
123
|
-
resumeBootstrap?(extraModules?: string[]): ng.auto.IInjectorService;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Restores the pre-1.8 behavior of jqLite that turns XHTML-like strings like
|
|
127
|
-
* `<div /><span />` to `<div></div><span></span>` instead of `<div><span></span></div>`.
|
|
128
|
-
* The new behavior is a security fix so if you use this method, please try to adjust
|
|
129
|
-
* to the change & remove the call as soon as possible.
|
|
130
|
-
* Note that this only patches jqLite. If you use jQuery 3.5.0 or newer, please read
|
|
131
|
-
* [jQuery 3.5 upgrade guide](https://jquery.com/upgrade-guide/3.5/) for more details
|
|
132
|
-
* about the workarounds.
|
|
133
|
-
*/
|
|
134
|
-
UNSAFE_restoreLegacyJqLiteXHTMLReplacement(): void;
|
|
135
|
-
}
|
|
136
3
|
|
|
137
4
|
///////////////////////////////////////////////////////////////////////////
|
|
138
5
|
// Module
|
|
@@ -466,184 +333,6 @@ declare namespace angular {
|
|
|
466
333
|
(): void;
|
|
467
334
|
}
|
|
468
335
|
|
|
469
|
-
/**
|
|
470
|
-
* $rootScope - $rootScopeProvider - service in module ng
|
|
471
|
-
* see https://docs.angularjs.org/api/ng/type/$rootScope.Scope and https://docs.angularjs.org/api/ng/service/$rootScope
|
|
472
|
-
*/
|
|
473
|
-
interface IRootScopeService {
|
|
474
|
-
$apply(): any;
|
|
475
|
-
$apply(exp: string): any;
|
|
476
|
-
$apply(exp: (scope: IScope) => any): any;
|
|
477
|
-
|
|
478
|
-
$applyAsync(): any;
|
|
479
|
-
$applyAsync(exp: string): any;
|
|
480
|
-
$applyAsync(exp: (scope: IScope) => any): any;
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* Dispatches an event name downwards to all child scopes (and their children) notifying the registered $rootScope.Scope listeners.
|
|
484
|
-
*
|
|
485
|
-
* 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.
|
|
486
|
-
*
|
|
487
|
-
* Any exception emitted from the listeners will be passed onto the $exceptionHandler service.
|
|
488
|
-
*
|
|
489
|
-
* @param name Event name to broadcast.
|
|
490
|
-
* @param args Optional one or more arguments which will be passed onto the event listeners.
|
|
491
|
-
*/
|
|
492
|
-
$broadcast(name: string, ...args: any[]): IAngularEvent;
|
|
493
|
-
$destroy(): void;
|
|
494
|
-
$digest(): void;
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* Suspend watchers of this scope subtree so that they will not be invoked during digest.
|
|
498
|
-
*
|
|
499
|
-
* This can be used to optimize your application when you know that running those watchers
|
|
500
|
-
* is redundant.
|
|
501
|
-
*
|
|
502
|
-
* **Warning**
|
|
503
|
-
*
|
|
504
|
-
* Suspending scopes from the digest cycle can have unwanted and difficult to debug results.
|
|
505
|
-
* Only use this approach if you are confident that you know what you are doing and have
|
|
506
|
-
* ample tests to ensure that bindings get updated as you expect.
|
|
507
|
-
*
|
|
508
|
-
* Some of the things to consider are:
|
|
509
|
-
*
|
|
510
|
-
* * Any external event on a directive/component will not trigger a digest while the hosting
|
|
511
|
-
* scope is suspended - even if the event handler calls `$apply()` or `$rootScope.$digest()`.
|
|
512
|
-
* * Transcluded content exists on a scope that inherits from outside a directive but exists
|
|
513
|
-
* as a child of the directive's containing scope. If the containing scope is suspended the
|
|
514
|
-
* transcluded scope will also be suspended, even if the scope from which the transcluded
|
|
515
|
-
* scope inherits is not suspended.
|
|
516
|
-
* * Multiple directives trying to manage the suspended status of a scope can confuse each other:
|
|
517
|
-
* * A call to `$suspend()` on an already suspended scope is a no-op.
|
|
518
|
-
* * A call to `$resume()` on a non-suspended scope is a no-op.
|
|
519
|
-
* * If two directives suspend a scope, then one of them resumes the scope, the scope will no
|
|
520
|
-
* longer be suspended. This could result in the other directive believing a scope to be
|
|
521
|
-
* suspended when it is not.
|
|
522
|
-
* * If a parent scope is suspended then all its descendants will be also excluded from future
|
|
523
|
-
* digests whether or not they have been suspended themselves. Note that this also applies to
|
|
524
|
-
* isolate child scopes.
|
|
525
|
-
* * Calling `$digest()` directly on a descendant of a suspended scope will still run the watchers
|
|
526
|
-
* for that scope and its descendants. When digesting we only check whether the current scope is
|
|
527
|
-
* locally suspended, rather than checking whether it has a suspended ancestor.
|
|
528
|
-
* * Calling `$resume()` on a scope that has a suspended ancestor will not cause the scope to be
|
|
529
|
-
* included in future digests until all its ancestors have been resumed.
|
|
530
|
-
* * Resolved promises, e.g. from explicit `$q` deferreds and `$http` calls, trigger `$apply()`
|
|
531
|
-
* against the `$rootScope` and so will still trigger a global digest even if the promise was
|
|
532
|
-
* initiated by a component that lives on a suspended scope.
|
|
533
|
-
*/
|
|
534
|
-
$suspend(): void;
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* Call this method to determine if this scope has been explicitly suspended. It will not
|
|
538
|
-
* tell you whether an ancestor has been suspended.
|
|
539
|
-
* To determine if this scope will be excluded from a digest triggered at the $rootScope,
|
|
540
|
-
* for example, you must check all its ancestors:
|
|
541
|
-
*
|
|
542
|
-
* ```
|
|
543
|
-
* function isExcludedFromDigest(scope) {
|
|
544
|
-
* while(scope) {
|
|
545
|
-
* if (scope.$isSuspended()) return true;
|
|
546
|
-
* scope = scope.$parent;
|
|
547
|
-
* }
|
|
548
|
-
* return false;
|
|
549
|
-
* ```
|
|
550
|
-
*
|
|
551
|
-
* Be aware that a scope may not be included in digests if it has a suspended ancestor,
|
|
552
|
-
* even if `$isSuspended()` returns false.
|
|
553
|
-
*
|
|
554
|
-
* @returns true if the current scope has been suspended.
|
|
555
|
-
*/
|
|
556
|
-
$isSuspended(): boolean;
|
|
557
|
-
|
|
558
|
-
/**
|
|
559
|
-
* Resume watchers of this scope subtree in case it was suspended.
|
|
560
|
-
*
|
|
561
|
-
* See {$rootScope.Scope#$suspend} for information about the dangers of using this approach.
|
|
562
|
-
*/
|
|
563
|
-
$resume(): void;
|
|
564
|
-
|
|
565
|
-
/**
|
|
566
|
-
* Dispatches an event name upwards through the scope hierarchy notifying the registered $rootScope.Scope listeners.
|
|
567
|
-
*
|
|
568
|
-
* 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.
|
|
569
|
-
*
|
|
570
|
-
* Any exception emitted from the listeners will be passed onto the $exceptionHandler service.
|
|
571
|
-
*
|
|
572
|
-
* @param name Event name to emit.
|
|
573
|
-
* @param args Optional one or more arguments which will be passed onto the event listeners.
|
|
574
|
-
*/
|
|
575
|
-
$emit(name: string, ...args: any[]): IAngularEvent;
|
|
576
|
-
|
|
577
|
-
$eval(): any;
|
|
578
|
-
$eval(expression: string, locals?: Object): any;
|
|
579
|
-
$eval(expression: (scope: IScope) => any, locals?: Object): any;
|
|
580
|
-
|
|
581
|
-
// Defaults to false by the implementation checking strategy
|
|
582
|
-
$new(isolate?: boolean, parent?: IScope): IScope;
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* Listens on events of a given type. See $emit for discussion of event life cycle.
|
|
586
|
-
*
|
|
587
|
-
* The event listener function format is: function(event, args...).
|
|
588
|
-
*
|
|
589
|
-
* @param name Event name to listen on.
|
|
590
|
-
* @param listener Function to call when the event is emitted.
|
|
591
|
-
*/
|
|
592
|
-
$on(
|
|
593
|
-
name: string,
|
|
594
|
-
listener: (event: IAngularEvent, ...args: any[]) => any,
|
|
595
|
-
): () => void;
|
|
596
|
-
|
|
597
|
-
$watch(
|
|
598
|
-
watchExpression: string,
|
|
599
|
-
listener?: string,
|
|
600
|
-
objectEquality?: boolean,
|
|
601
|
-
): () => void;
|
|
602
|
-
$watch<T>(
|
|
603
|
-
watchExpression: string,
|
|
604
|
-
listener?: (newValue: T, oldValue: T, scope: IScope) => any,
|
|
605
|
-
objectEquality?: boolean,
|
|
606
|
-
): () => void;
|
|
607
|
-
$watch(
|
|
608
|
-
watchExpression: (scope: IScope) => any,
|
|
609
|
-
listener?: string,
|
|
610
|
-
objectEquality?: boolean,
|
|
611
|
-
): () => void;
|
|
612
|
-
$watch<T>(
|
|
613
|
-
watchExpression: (scope: IScope) => T,
|
|
614
|
-
listener?: (newValue: T, oldValue: T, scope: IScope) => any,
|
|
615
|
-
objectEquality?: boolean,
|
|
616
|
-
): () => void;
|
|
617
|
-
|
|
618
|
-
$watchCollection<T>(
|
|
619
|
-
watchExpression: string,
|
|
620
|
-
listener: (newValue: T, oldValue: T, scope: IScope) => any,
|
|
621
|
-
): () => void;
|
|
622
|
-
$watchCollection<T>(
|
|
623
|
-
watchExpression: (scope: IScope) => T,
|
|
624
|
-
listener: (newValue: T, oldValue: T, scope: IScope) => any,
|
|
625
|
-
): () => void;
|
|
626
|
-
|
|
627
|
-
$watchGroup(
|
|
628
|
-
watchExpressions: any[],
|
|
629
|
-
listener: (newValue: any, oldValue: any, scope: IScope) => any,
|
|
630
|
-
): () => void;
|
|
631
|
-
$watchGroup(
|
|
632
|
-
watchExpressions: Array<{ (scope: IScope): any }>,
|
|
633
|
-
listener: (newValue: any, oldValue: any, scope: IScope) => any,
|
|
634
|
-
): () => void;
|
|
635
|
-
|
|
636
|
-
$parent: IScope;
|
|
637
|
-
$root: IRootScopeService;
|
|
638
|
-
$id: number;
|
|
639
|
-
|
|
640
|
-
// Hidden members
|
|
641
|
-
$$isolateBindings: any;
|
|
642
|
-
$$phase: any;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
interface IScope extends IRootScopeService {}
|
|
646
|
-
|
|
647
336
|
/**
|
|
648
337
|
* $scope for ngRepeat directive.
|
|
649
338
|
* see https://docs.angularjs.org/api/ng/directive/ngRepeat
|
|
@@ -707,44 +396,6 @@ declare namespace angular {
|
|
|
707
396
|
defaultPrevented: boolean;
|
|
708
397
|
}
|
|
709
398
|
|
|
710
|
-
///////////////////////////////////////////////////////////////////////////
|
|
711
|
-
// WindowService
|
|
712
|
-
// see http://docs.angularjs.org/api/ng/service/$window
|
|
713
|
-
///////////////////////////////////////////////////////////////////////////
|
|
714
|
-
interface IWindowService extends Window {
|
|
715
|
-
[key: string]: any;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
///////////////////////////////////////////////////////////////////////////
|
|
719
|
-
// TimeoutService
|
|
720
|
-
// see http://docs.angularjs.org/api/ng/service/$timeout
|
|
721
|
-
///////////////////////////////////////////////////////////////////////////
|
|
722
|
-
interface ITimeoutService {
|
|
723
|
-
(delay?: number, invokeApply?: boolean): IPromise<void>;
|
|
724
|
-
<T>(
|
|
725
|
-
fn: (...args: any[]) => T | IPromise<T>,
|
|
726
|
-
delay?: number,
|
|
727
|
-
invokeApply?: boolean,
|
|
728
|
-
...args: any[]
|
|
729
|
-
): IPromise<T>;
|
|
730
|
-
cancel(promise?: IPromise<any>): boolean;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
///////////////////////////////////////////////////////////////////////////
|
|
734
|
-
// IntervalService
|
|
735
|
-
// see http://docs.angularjs.org/api/ng/service/$interval
|
|
736
|
-
///////////////////////////////////////////////////////////////////////////
|
|
737
|
-
interface IIntervalService {
|
|
738
|
-
(
|
|
739
|
-
func: Function,
|
|
740
|
-
delay: number,
|
|
741
|
-
count?: number,
|
|
742
|
-
invokeApply?: boolean,
|
|
743
|
-
...args: any[]
|
|
744
|
-
): IPromise<any>;
|
|
745
|
-
cancel(promise: IPromise<any>): boolean;
|
|
746
|
-
}
|
|
747
|
-
|
|
748
399
|
/**
|
|
749
400
|
* $filter - $filterProvider - service in module ng
|
|
750
401
|
*
|
|
@@ -1129,15 +780,6 @@ declare namespace angular {
|
|
|
1129
780
|
}): ILocationProvider;
|
|
1130
781
|
}
|
|
1131
782
|
|
|
1132
|
-
///////////////////////////////////////////////////////////////////////////
|
|
1133
|
-
// DocumentService
|
|
1134
|
-
// see http://docs.angularjs.org/api/ng/service/$document
|
|
1135
|
-
///////////////////////////////////////////////////////////////////////////
|
|
1136
|
-
interface IDocumentService extends JQLite {
|
|
1137
|
-
// Must return intersection type for index signature compatibility with JQuery
|
|
1138
|
-
[index: number]: HTMLElement & Document;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
783
|
///////////////////////////////////////////////////////////////////////////
|
|
1142
784
|
// ExceptionHandlerService
|
|
1143
785
|
// see http://docs.angularjs.org/api/ng/service/$exceptionHandler
|
|
@@ -1146,389 +788,6 @@ declare namespace angular {
|
|
|
1146
788
|
(exception: Error, cause?: string): void;
|
|
1147
789
|
}
|
|
1148
790
|
|
|
1149
|
-
///////////////////////////////////////////////////////////////////////////
|
|
1150
|
-
// RootElementService
|
|
1151
|
-
// see http://docs.angularjs.org/api/ng/service/$rootElement
|
|
1152
|
-
///////////////////////////////////////////////////////////////////////////
|
|
1153
|
-
interface IRootElementService extends JQLite {}
|
|
1154
|
-
|
|
1155
|
-
interface IQResolveReject<T> {
|
|
1156
|
-
(): void;
|
|
1157
|
-
(value: T): void;
|
|
1158
|
-
}
|
|
1159
|
-
/**
|
|
1160
|
-
* $q - service in module ng
|
|
1161
|
-
* A promise/deferred implementation inspired by Kris Kowal's Q.
|
|
1162
|
-
* See http://docs.angularjs.org/api/ng/service/$q
|
|
1163
|
-
*/
|
|
1164
|
-
interface IQService {
|
|
1165
|
-
new <T>(
|
|
1166
|
-
resolver: (
|
|
1167
|
-
resolve: IQResolveReject<T>,
|
|
1168
|
-
reject: IQResolveReject<any>,
|
|
1169
|
-
) => any,
|
|
1170
|
-
): IPromise<T>;
|
|
1171
|
-
<T>(
|
|
1172
|
-
resolver: (
|
|
1173
|
-
resolve: IQResolveReject<T>,
|
|
1174
|
-
reject: IQResolveReject<any>,
|
|
1175
|
-
) => any,
|
|
1176
|
-
): IPromise<T>;
|
|
1177
|
-
|
|
1178
|
-
/**
|
|
1179
|
-
* Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
|
|
1180
|
-
*
|
|
1181
|
-
* Returns a single promise that will be resolved with an array of values, each value corresponding to the promise at the same index in the promises array. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
|
|
1182
|
-
*
|
|
1183
|
-
* @param promises An array of promises.
|
|
1184
|
-
*/
|
|
1185
|
-
all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(
|
|
1186
|
-
values: [
|
|
1187
|
-
T1 | IPromise<T1>,
|
|
1188
|
-
T2 | IPromise<T2>,
|
|
1189
|
-
T3 | IPromise<T3>,
|
|
1190
|
-
T4 | IPromise<T4>,
|
|
1191
|
-
T5 | IPromise<T5>,
|
|
1192
|
-
T6 | IPromise<T6>,
|
|
1193
|
-
T7 | IPromise<T7>,
|
|
1194
|
-
T8 | IPromise<T8>,
|
|
1195
|
-
T9 | IPromise<T9>,
|
|
1196
|
-
T10 | IPromise<T10>,
|
|
1197
|
-
],
|
|
1198
|
-
): IPromise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
|
|
1199
|
-
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(
|
|
1200
|
-
values: [
|
|
1201
|
-
T1 | IPromise<T1>,
|
|
1202
|
-
T2 | IPromise<T2>,
|
|
1203
|
-
T3 | IPromise<T3>,
|
|
1204
|
-
T4 | IPromise<T4>,
|
|
1205
|
-
T5 | IPromise<T5>,
|
|
1206
|
-
T6 | IPromise<T6>,
|
|
1207
|
-
T7 | IPromise<T7>,
|
|
1208
|
-
T8 | IPromise<T8>,
|
|
1209
|
-
T9 | IPromise<T9>,
|
|
1210
|
-
],
|
|
1211
|
-
): IPromise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
|
1212
|
-
all<T1, T2, T3, T4, T5, T6, T7, T8>(
|
|
1213
|
-
values: [
|
|
1214
|
-
T1 | IPromise<T1>,
|
|
1215
|
-
T2 | IPromise<T2>,
|
|
1216
|
-
T3 | IPromise<T3>,
|
|
1217
|
-
T4 | IPromise<T4>,
|
|
1218
|
-
T5 | IPromise<T5>,
|
|
1219
|
-
T6 | IPromise<T6>,
|
|
1220
|
-
T7 | IPromise<T7>,
|
|
1221
|
-
T8 | IPromise<T8>,
|
|
1222
|
-
],
|
|
1223
|
-
): IPromise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
|
1224
|
-
all<T1, T2, T3, T4, T5, T6, T7>(
|
|
1225
|
-
values: [
|
|
1226
|
-
T1 | IPromise<T1>,
|
|
1227
|
-
T2 | IPromise<T2>,
|
|
1228
|
-
T3 | IPromise<T3>,
|
|
1229
|
-
T4 | IPromise<T4>,
|
|
1230
|
-
T5 | IPromise<T5>,
|
|
1231
|
-
T6 | IPromise<T6>,
|
|
1232
|
-
T7 | IPromise<T7>,
|
|
1233
|
-
],
|
|
1234
|
-
): IPromise<[T1, T2, T3, T4, T5, T6, T7]>;
|
|
1235
|
-
all<T1, T2, T3, T4, T5, T6>(
|
|
1236
|
-
values: [
|
|
1237
|
-
T1 | IPromise<T1>,
|
|
1238
|
-
T2 | IPromise<T2>,
|
|
1239
|
-
T3 | IPromise<T3>,
|
|
1240
|
-
T4 | IPromise<T4>,
|
|
1241
|
-
T5 | IPromise<T5>,
|
|
1242
|
-
T6 | IPromise<T6>,
|
|
1243
|
-
],
|
|
1244
|
-
): IPromise<[T1, T2, T3, T4, T5, T6]>;
|
|
1245
|
-
all<T1, T2, T3, T4, T5>(
|
|
1246
|
-
values: [
|
|
1247
|
-
T1 | IPromise<T1>,
|
|
1248
|
-
T2 | IPromise<T2>,
|
|
1249
|
-
T3 | IPromise<T3>,
|
|
1250
|
-
T4 | IPromise<T4>,
|
|
1251
|
-
T5 | IPromise<T5>,
|
|
1252
|
-
],
|
|
1253
|
-
): IPromise<[T1, T2, T3, T4, T5]>;
|
|
1254
|
-
all<T1, T2, T3, T4>(
|
|
1255
|
-
values: [
|
|
1256
|
-
T1 | IPromise<T1>,
|
|
1257
|
-
T2 | IPromise<T2>,
|
|
1258
|
-
T3 | IPromise<T3>,
|
|
1259
|
-
T4 | IPromise<T4>,
|
|
1260
|
-
],
|
|
1261
|
-
): IPromise<[T1, T2, T3, T4]>;
|
|
1262
|
-
all<T1, T2, T3>(
|
|
1263
|
-
values: [T1 | IPromise<T1>, T2 | IPromise<T2>, T3 | IPromise<T3>],
|
|
1264
|
-
): IPromise<[T1, T2, T3]>;
|
|
1265
|
-
all<T1, T2>(
|
|
1266
|
-
values: [T1 | IPromise<T1>, T2 | IPromise<T2>],
|
|
1267
|
-
): IPromise<[T1, T2]>;
|
|
1268
|
-
all<TAll>(promises: Array<TAll | IPromise<TAll>>): IPromise<TAll[]>;
|
|
1269
|
-
/**
|
|
1270
|
-
* Combines multiple promises into a single promise that is resolved when all of the input promises are resolved.
|
|
1271
|
-
*
|
|
1272
|
-
* Returns a single promise that will be resolved with a hash of values, each value corresponding to the promise at the same key in the promises hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value.
|
|
1273
|
-
*
|
|
1274
|
-
* @param promises A hash of promises.
|
|
1275
|
-
*/
|
|
1276
|
-
all<T>(promises: { [K in keyof T]: IPromise<T[K]> | T[K] }): IPromise<T>;
|
|
1277
|
-
/**
|
|
1278
|
-
* Creates a Deferred object which represents a task which will finish in the future.
|
|
1279
|
-
*/
|
|
1280
|
-
defer<T>(): IDeferred<T>;
|
|
1281
|
-
/**
|
|
1282
|
-
* Returns a promise that resolves or rejects as soon as one of those promises resolves or rejects, with the value or reason from that promise.
|
|
1283
|
-
*
|
|
1284
|
-
* @param promises A list or hash of promises.
|
|
1285
|
-
*/
|
|
1286
|
-
race<T>(
|
|
1287
|
-
promises: Array<IPromise<T>> | { [key: string]: IPromise<T> },
|
|
1288
|
-
): IPromise<T>;
|
|
1289
|
-
/**
|
|
1290
|
-
* Creates a promise that is resolved as rejected with the specified reason. This api should be used to forward rejection in a chain of promises. If you are dealing with the last promise in a promise chain, you don't need to worry about it.
|
|
1291
|
-
*
|
|
1292
|
-
* When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of reject as the throw keyword in JavaScript. This also means that if you "catch" an error via a promise error callback and you want to forward the error to the promise derived from the current promise, you have to "rethrow" the error by returning a rejection constructed via reject.
|
|
1293
|
-
*
|
|
1294
|
-
* @param reason Constant, message, exception or an object representing the rejection reason.
|
|
1295
|
-
*/
|
|
1296
|
-
reject(reason?: any): IPromise<never>;
|
|
1297
|
-
/**
|
|
1298
|
-
* Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
|
|
1299
|
-
*
|
|
1300
|
-
* @param value Value or a promise
|
|
1301
|
-
*/
|
|
1302
|
-
resolve<T>(value: PromiseLike<T> | T): IPromise<T>;
|
|
1303
|
-
/**
|
|
1304
|
-
* @deprecated Since TS 2.4, inference is stricter and no longer produces the desired type when T1 !== T2.
|
|
1305
|
-
* To use resolve with two different types, pass a union type to the single-type-argument overload.
|
|
1306
|
-
*/
|
|
1307
|
-
resolve<T1, T2>(value: PromiseLike<T1> | T2): IPromise<T1 | T2>;
|
|
1308
|
-
/**
|
|
1309
|
-
* Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
|
|
1310
|
-
*/
|
|
1311
|
-
resolve(): IPromise<void>;
|
|
1312
|
-
/**
|
|
1313
|
-
* Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
|
|
1314
|
-
*
|
|
1315
|
-
* @param value Value or a promise
|
|
1316
|
-
*/
|
|
1317
|
-
when<T>(value: PromiseLike<T> | T): IPromise<T>;
|
|
1318
|
-
when<T1, T2>(value: PromiseLike<T1> | T2): IPromise<T1 | T2>;
|
|
1319
|
-
when<TResult, T>(
|
|
1320
|
-
value: PromiseLike<T> | T,
|
|
1321
|
-
successCallback: (promiseValue: T) => PromiseLike<TResult> | TResult,
|
|
1322
|
-
): IPromise<TResult>;
|
|
1323
|
-
when<TResult, T>(
|
|
1324
|
-
value: T,
|
|
1325
|
-
successCallback: (promiseValue: T) => PromiseLike<TResult> | TResult,
|
|
1326
|
-
errorCallback: null | undefined | ((reason: any) => any),
|
|
1327
|
-
notifyCallback?: (state: any) => any,
|
|
1328
|
-
): IPromise<TResult>;
|
|
1329
|
-
when<TResult, TResult2, T>(
|
|
1330
|
-
value: PromiseLike<T>,
|
|
1331
|
-
successCallback: (promiseValue: T) => PromiseLike<TResult> | TResult,
|
|
1332
|
-
errorCallback: (reason: any) => TResult2 | PromiseLike<TResult2>,
|
|
1333
|
-
notifyCallback?: (state: any) => any,
|
|
1334
|
-
): IPromise<TResult | TResult2>;
|
|
1335
|
-
/**
|
|
1336
|
-
* Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise. This is useful when you are dealing with an object that might or might not be a promise, or if the promise comes from a source that can't be trusted.
|
|
1337
|
-
*/
|
|
1338
|
-
when(): IPromise<void>;
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
interface IQProvider {
|
|
1342
|
-
/**
|
|
1343
|
-
* Retrieves or overrides whether to generate an error when a rejected promise is not handled.
|
|
1344
|
-
* This feature is enabled by default.
|
|
1345
|
-
*
|
|
1346
|
-
* @returns Current value
|
|
1347
|
-
*/
|
|
1348
|
-
errorOnUnhandledRejections(): boolean;
|
|
1349
|
-
|
|
1350
|
-
/**
|
|
1351
|
-
* Retrieves or overrides whether to generate an error when a rejected promise is not handled.
|
|
1352
|
-
* This feature is enabled by default.
|
|
1353
|
-
*
|
|
1354
|
-
* @param value Whether to generate an error when a rejected promise is not handled.
|
|
1355
|
-
* @returns Self for chaining otherwise.
|
|
1356
|
-
*/
|
|
1357
|
-
errorOnUnhandledRejections(value: boolean): IQProvider;
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
interface IPromise<T> {
|
|
1361
|
-
/**
|
|
1362
|
-
* Regardless of when the promise was or will be resolved or rejected, then calls one of
|
|
1363
|
-
* the success or error callbacks asynchronously as soon as the result is available. The
|
|
1364
|
-
* callbacks are called with a single argument: the result or rejection reason.
|
|
1365
|
-
* Additionally, the notify callback may be called zero or more times to provide a
|
|
1366
|
-
* progress indication, before the promise is resolved or rejected.
|
|
1367
|
-
* The `successCallBack` may return `IPromise<never>` for when a `$q.reject()` needs to
|
|
1368
|
-
* be returned.
|
|
1369
|
-
* This method returns a new promise which is resolved or rejected via the return value
|
|
1370
|
-
* of the `successCallback`, `errorCallback`. It also notifies via the return value of
|
|
1371
|
-
* the `notifyCallback` method. The promise can not be resolved or rejected from the
|
|
1372
|
-
* `notifyCallback` method.
|
|
1373
|
-
*/
|
|
1374
|
-
then<TResult1 = T, TResult2 = never>(
|
|
1375
|
-
successCallback?:
|
|
1376
|
-
| ((value: T) => PromiseLike<never> | PromiseLike<TResult1> | TResult1)
|
|
1377
|
-
| null,
|
|
1378
|
-
errorCallback?:
|
|
1379
|
-
| ((
|
|
1380
|
-
reason: any,
|
|
1381
|
-
) => PromiseLike<never> | PromiseLike<TResult2> | TResult2)
|
|
1382
|
-
| null,
|
|
1383
|
-
notifyCallback?: (state: any) => any,
|
|
1384
|
-
): IPromise<TResult1 | TResult2>;
|
|
1385
|
-
then<TResult1 = T, TResult2 = never>(
|
|
1386
|
-
successCallback?:
|
|
1387
|
-
| ((value: T) => IPromise<never> | IPromise<TResult1> | TResult1)
|
|
1388
|
-
| null,
|
|
1389
|
-
errorCallback?:
|
|
1390
|
-
| ((reason: any) => IPromise<never> | IPromise<TResult2> | TResult2)
|
|
1391
|
-
| null,
|
|
1392
|
-
notifyCallback?: (state: any) => any,
|
|
1393
|
-
): IPromise<TResult1 | TResult2>;
|
|
1394
|
-
|
|
1395
|
-
/**
|
|
1396
|
-
* Shorthand for promise.then(null, errorCallback)
|
|
1397
|
-
*/
|
|
1398
|
-
catch<TResult = never>(
|
|
1399
|
-
onRejected?:
|
|
1400
|
-
| ((reason: any) => PromiseLike<never> | PromiseLike<TResult> | TResult)
|
|
1401
|
-
| null,
|
|
1402
|
-
): IPromise<T | TResult>;
|
|
1403
|
-
catch<TResult = never>(
|
|
1404
|
-
onRejected?:
|
|
1405
|
-
| ((reason: any) => IPromise<never> | IPromise<TResult> | TResult)
|
|
1406
|
-
| null,
|
|
1407
|
-
): IPromise<T | TResult>;
|
|
1408
|
-
|
|
1409
|
-
/**
|
|
1410
|
-
* Allows you to observe either the fulfillment or rejection of a promise, but to do so without modifying the final value. This is useful to release resources or do some clean-up that needs to be done whether the promise was rejected or resolved. See the full specification for more information.
|
|
1411
|
-
*
|
|
1412
|
-
* Because finally is a reserved word in JavaScript and reserved keywords are not supported as property names by ES3, you'll need to invoke the method like promise['finally'](callback) to make your code IE8 and Android 2.x compatible.
|
|
1413
|
-
*/
|
|
1414
|
-
finally(finallyCallback: () => void): IPromise<T>;
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
interface IDeferred<T> {
|
|
1418
|
-
resolve(value?: T | IPromise<T>): void;
|
|
1419
|
-
reject(reason?: any): void;
|
|
1420
|
-
notify(state?: any): void;
|
|
1421
|
-
promise: IPromise<T>;
|
|
1422
|
-
}
|
|
1423
|
-
|
|
1424
|
-
///////////////////////////////////////////////////////////////////////////
|
|
1425
|
-
// AnchorScrollService
|
|
1426
|
-
// see http://docs.angularjs.org/api/ng/service/$anchorScroll
|
|
1427
|
-
///////////////////////////////////////////////////////////////////////////
|
|
1428
|
-
interface IAnchorScrollService {
|
|
1429
|
-
(): void;
|
|
1430
|
-
(hash: string): void;
|
|
1431
|
-
yOffset: any;
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
interface IAnchorScrollProvider extends IServiceProvider {
|
|
1435
|
-
disableAutoScrolling(): void;
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
/**
|
|
1439
|
-
* $cacheFactory - service in module ng
|
|
1440
|
-
*
|
|
1441
|
-
* Factory that constructs Cache objects and gives access to them.
|
|
1442
|
-
*
|
|
1443
|
-
* see https://docs.angularjs.org/api/ng/service/$cacheFactory
|
|
1444
|
-
*/
|
|
1445
|
-
interface ICacheFactoryService {
|
|
1446
|
-
/**
|
|
1447
|
-
* Factory that constructs Cache objects and gives access to them.
|
|
1448
|
-
*
|
|
1449
|
-
* @param cacheId Name or id of the newly created cache.
|
|
1450
|
-
* @param optionsMap Options object that specifies the cache behavior. Properties:
|
|
1451
|
-
*
|
|
1452
|
-
* capacity — turns the cache into LRU cache.
|
|
1453
|
-
*/
|
|
1454
|
-
(
|
|
1455
|
-
cacheId: string,
|
|
1456
|
-
optionsMap?: { capacity?: number | undefined },
|
|
1457
|
-
): ICacheObject;
|
|
1458
|
-
|
|
1459
|
-
/**
|
|
1460
|
-
* Get information about all the caches that have been created.
|
|
1461
|
-
* @returns key-value map of cacheId to the result of calling cache#info
|
|
1462
|
-
*/
|
|
1463
|
-
info(): any;
|
|
1464
|
-
|
|
1465
|
-
/**
|
|
1466
|
-
* Get access to a cache object by the cacheId used when it was created.
|
|
1467
|
-
*
|
|
1468
|
-
* @param cacheId Name or id of a cache to access.
|
|
1469
|
-
*/
|
|
1470
|
-
get(cacheId: string): ICacheObject;
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
/**
|
|
1474
|
-
* $cacheFactory.Cache - type in module ng
|
|
1475
|
-
*
|
|
1476
|
-
* A cache object used to store and retrieve data, primarily used by $http and the script directive to cache templates and other data.
|
|
1477
|
-
*
|
|
1478
|
-
* see https://docs.angularjs.org/api/ng/type/$cacheFactory.Cache
|
|
1479
|
-
*/
|
|
1480
|
-
interface ICacheObject {
|
|
1481
|
-
/**
|
|
1482
|
-
* Retrieve information regarding a particular Cache.
|
|
1483
|
-
*/
|
|
1484
|
-
info(): {
|
|
1485
|
-
/**
|
|
1486
|
-
* the id of the cache instance
|
|
1487
|
-
*/
|
|
1488
|
-
id: string;
|
|
1489
|
-
|
|
1490
|
-
/**
|
|
1491
|
-
* the number of entries kept in the cache instance
|
|
1492
|
-
*/
|
|
1493
|
-
size: number;
|
|
1494
|
-
// ...: any additional properties from the options object when creating the cache.
|
|
1495
|
-
};
|
|
1496
|
-
|
|
1497
|
-
/**
|
|
1498
|
-
* Inserts a named entry into the Cache object to be retrieved later, and incrementing the size of the cache if the key was not already present in the cache. If behaving like an LRU cache, it will also remove stale entries from the set.
|
|
1499
|
-
*
|
|
1500
|
-
* It will not insert undefined values into the cache.
|
|
1501
|
-
*
|
|
1502
|
-
* @param key the key under which the cached data is stored.
|
|
1503
|
-
* @param value the value to store alongside the key. If it is undefined, the key will not be stored.
|
|
1504
|
-
*/
|
|
1505
|
-
put<T>(key: string, value?: T): T;
|
|
1506
|
-
|
|
1507
|
-
/**
|
|
1508
|
-
* Retrieves named data stored in the Cache object.
|
|
1509
|
-
*
|
|
1510
|
-
* @param key the key of the data to be retrieved
|
|
1511
|
-
*/
|
|
1512
|
-
get<T>(key: string): T | undefined;
|
|
1513
|
-
|
|
1514
|
-
/**
|
|
1515
|
-
* Removes an entry from the Cache object.
|
|
1516
|
-
*
|
|
1517
|
-
* @param key the key of the entry to be removed
|
|
1518
|
-
*/
|
|
1519
|
-
remove(key: string): void;
|
|
1520
|
-
|
|
1521
|
-
/**
|
|
1522
|
-
* Clears the cache object of any entries.
|
|
1523
|
-
*/
|
|
1524
|
-
removeAll(): void;
|
|
1525
|
-
|
|
1526
|
-
/**
|
|
1527
|
-
* Destroys the Cache object entirely, removing it from the $cacheFactory set.
|
|
1528
|
-
*/
|
|
1529
|
-
destroy(): void;
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
791
|
///////////////////////////////////////////////////////////////////////////
|
|
1533
792
|
// CompileService
|
|
1534
793
|
// see http://docs.angularjs.org/api/ng/service/$compile
|
|
@@ -1684,14 +943,6 @@ declare namespace angular {
|
|
|
1684
943
|
// see http://docs.angularjs.org/api/ng/provider/$controllerProvider
|
|
1685
944
|
///////////////////////////////////////////////////////////////////////////
|
|
1686
945
|
|
|
1687
|
-
/**
|
|
1688
|
-
* The minimal local definitions required by $controller(ctrl, locals) calls.
|
|
1689
|
-
*/
|
|
1690
|
-
interface IControllerLocals {
|
|
1691
|
-
$scope: ng.IScope;
|
|
1692
|
-
$element: JQuery;
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
946
|
interface IControllerService {
|
|
1696
947
|
// Although the documentation doesn't state this, locals are optional
|
|
1697
948
|
<T>(controllerConstructor: new (...args: any[]) => T, locals?: any): T;
|
|
@@ -2024,39 +1275,6 @@ declare namespace angular {
|
|
|
2024
1275
|
): void;
|
|
2025
1276
|
}
|
|
2026
1277
|
|
|
2027
|
-
///////////////////////////////////////////////////////////////////////////
|
|
2028
|
-
// InterpolateService
|
|
2029
|
-
// see http://docs.angularjs.org/api/ng/service/$interpolate
|
|
2030
|
-
// see http://docs.angularjs.org/api/ng/provider/$interpolateProvider
|
|
2031
|
-
///////////////////////////////////////////////////////////////////////////
|
|
2032
|
-
interface IInterpolateService {
|
|
2033
|
-
(
|
|
2034
|
-
text: string,
|
|
2035
|
-
mustHaveExpression?: boolean,
|
|
2036
|
-
trustedContext?: string,
|
|
2037
|
-
allOrNothing?: boolean,
|
|
2038
|
-
): IInterpolationFunction;
|
|
2039
|
-
endSymbol(): string;
|
|
2040
|
-
startSymbol(): string;
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
|
-
interface IInterpolationFunction {
|
|
2044
|
-
(context: any): string;
|
|
2045
|
-
}
|
|
2046
|
-
|
|
2047
|
-
interface IInterpolateProvider extends IServiceProvider {
|
|
2048
|
-
startSymbol(): string;
|
|
2049
|
-
startSymbol(value: string): IInterpolateProvider;
|
|
2050
|
-
endSymbol(): string;
|
|
2051
|
-
endSymbol(value: string): IInterpolateProvider;
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
///////////////////////////////////////////////////////////////////////////
|
|
2055
|
-
// TemplateCacheService
|
|
2056
|
-
// see http://docs.angularjs.org/api/ng/service/$templateCache
|
|
2057
|
-
///////////////////////////////////////////////////////////////////////////
|
|
2058
|
-
interface ITemplateCacheService extends ICacheObject {}
|
|
2059
|
-
|
|
2060
1278
|
///////////////////////////////////////////////////////////////////////////
|
|
2061
1279
|
// SCEService
|
|
2062
1280
|
// see http://docs.angularjs.org/api/ng/service/$sce
|
|
@@ -2119,88 +1337,6 @@ declare namespace angular {
|
|
|
2119
1337
|
trustedResourceUrlList(trustedList: any[]): void;
|
|
2120
1338
|
}
|
|
2121
1339
|
|
|
2122
|
-
/**
|
|
2123
|
-
* $templateRequest service
|
|
2124
|
-
* see http://docs.angularjs.org/api/ng/service/$templateRequest
|
|
2125
|
-
*/
|
|
2126
|
-
interface ITemplateRequestService {
|
|
2127
|
-
/**
|
|
2128
|
-
* Downloads a template using $http and, upon success, stores the
|
|
2129
|
-
* contents inside of $templateCache.
|
|
2130
|
-
*
|
|
2131
|
-
* If the HTTP request fails or the response data of the HTTP request is
|
|
2132
|
-
* empty then a $compile error will be thrown (unless
|
|
2133
|
-
* {ignoreRequestError} is set to true).
|
|
2134
|
-
*
|
|
2135
|
-
* @param tpl The template URL.
|
|
2136
|
-
* @param ignoreRequestError Whether or not to ignore the exception
|
|
2137
|
-
* when the request fails or the template is
|
|
2138
|
-
* empty.
|
|
2139
|
-
*
|
|
2140
|
-
* @return A promise whose value is the template content.
|
|
2141
|
-
*/
|
|
2142
|
-
(tpl: string, ignoreRequestError?: boolean): IPromise<string>;
|
|
2143
|
-
/**
|
|
2144
|
-
* total amount of pending template requests being downloaded.
|
|
2145
|
-
*/
|
|
2146
|
-
totalPendingRequests: number;
|
|
2147
|
-
}
|
|
2148
|
-
|
|
2149
|
-
///////////////////////////////////////////////////////////////////////////
|
|
2150
|
-
// Component
|
|
2151
|
-
// see http://angularjs.blogspot.com.br/2015/11/angularjs-15-beta2-and-14-releases.html
|
|
2152
|
-
// and http://toddmotto.com/exploring-the-angular-1-5-component-method/
|
|
2153
|
-
///////////////////////////////////////////////////////////////////////////
|
|
2154
|
-
/**
|
|
2155
|
-
* Component definition object (a simplified directive definition object)
|
|
2156
|
-
*/
|
|
2157
|
-
interface IComponentOptions {
|
|
2158
|
-
/**
|
|
2159
|
-
* Controller constructor function that should be associated with newly created scope or the name of a registered
|
|
2160
|
-
* controller if passed as a string. Empty function by default.
|
|
2161
|
-
* Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)
|
|
2162
|
-
*/
|
|
2163
|
-
controller?: string | Injectable<IControllerConstructor> | undefined;
|
|
2164
|
-
/**
|
|
2165
|
-
* An identifier name for a reference to the controller. If present, the controller will be published to its scope under
|
|
2166
|
-
* the specified name. If not present, this will default to '$ctrl'.
|
|
2167
|
-
*/
|
|
2168
|
-
controllerAs?: string | undefined;
|
|
2169
|
-
/**
|
|
2170
|
-
* html template as a string or a function that returns an html template as a string which should be used as the
|
|
2171
|
-
* contents of this component. Empty string by default.
|
|
2172
|
-
* If template is a function, then it is injected with the following locals:
|
|
2173
|
-
* $element - Current element
|
|
2174
|
-
* $attrs - Current attributes object for the element
|
|
2175
|
-
* Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)
|
|
2176
|
-
*/
|
|
2177
|
-
template?: string | Injectable<(...args: any[]) => string> | undefined;
|
|
2178
|
-
/**
|
|
2179
|
-
* Path or function that returns a path to an html template that should be used as the contents of this component.
|
|
2180
|
-
* If templateUrl is a function, then it is injected with the following locals:
|
|
2181
|
-
* $element - Current element
|
|
2182
|
-
* $attrs - Current attributes object for the element
|
|
2183
|
-
* Use the array form to define dependencies (necessary if strictDi is enabled and you require dependency injection)
|
|
2184
|
-
*/
|
|
2185
|
-
templateUrl?: string | Injectable<(...args: any[]) => string> | undefined;
|
|
2186
|
-
/**
|
|
2187
|
-
* Define DOM attribute binding to component properties. Component properties are always bound to the component
|
|
2188
|
-
* controller and not to the scope.
|
|
2189
|
-
*/
|
|
2190
|
-
bindings?: { [boundProperty: string]: string } | undefined;
|
|
2191
|
-
/**
|
|
2192
|
-
* Whether transclusion is enabled. Disabled by default.
|
|
2193
|
-
*/
|
|
2194
|
-
transclude?: boolean | { [slot: string]: string } | undefined;
|
|
2195
|
-
/**
|
|
2196
|
-
* Requires the controllers of other directives and binds them to this component's controller.
|
|
2197
|
-
* The object keys specify the property names under which the required controllers (object values) will be bound.
|
|
2198
|
-
* Note that the required controllers will not be available during the instantiation of the controller,
|
|
2199
|
-
* but they are guaranteed to be available just before the $onInit method is executed!
|
|
2200
|
-
*/
|
|
2201
|
-
require?: { [controller: string]: string } | undefined;
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
1340
|
type IControllerConstructor =
|
|
2205
1341
|
| (new (...args: any[]) => IController) // Instead of classes, plain functions are often used as controller constructors, especially in examples.
|
|
2206
1342
|
| ((...args: any[]) => void | IController);
|
|
@@ -2267,22 +1403,6 @@ declare namespace angular {
|
|
|
2267
1403
|
$onInit(): void;
|
|
2268
1404
|
}
|
|
2269
1405
|
|
|
2270
|
-
/**
|
|
2271
|
-
* Interface for the $doCheck lifecycle hook
|
|
2272
|
-
* https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
|
|
2273
|
-
*/
|
|
2274
|
-
interface IDoCheck {
|
|
2275
|
-
/**
|
|
2276
|
-
* Called on each turn of the digest cycle. Provides an opportunity to detect and act on changes.
|
|
2277
|
-
* Any actions that you wish to take in response to the changes that you detect must be invoked from this hook;
|
|
2278
|
-
* implementing this has no effect on when `$onChanges` is called. For example, this hook could be useful if you wish
|
|
2279
|
-
* to perform a deep equality check, or to check a `Dat`e object, changes to which would not be detected by Angular's
|
|
2280
|
-
* change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments; if detecting changes,
|
|
2281
|
-
* you must store the previous value(s) for comparison to the current values.
|
|
2282
|
-
*/
|
|
2283
|
-
$doCheck(): void;
|
|
2284
|
-
}
|
|
2285
|
-
|
|
2286
1406
|
/**
|
|
2287
1407
|
* Interface for the $onChanges lifecycle hook
|
|
2288
1408
|
* https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
|
|
@@ -2456,21 +1576,6 @@ declare namespace angular {
|
|
|
2456
1576
|
transclude?: boolean | "element" | { [slot: string]: string } | undefined;
|
|
2457
1577
|
}
|
|
2458
1578
|
|
|
2459
|
-
/**
|
|
2460
|
-
* These interfaces are kept for compatibility with older versions of these type definitions.
|
|
2461
|
-
* Actually, Angular doesn't create a special subclass of jQuery objects. It extends jQuery.prototype
|
|
2462
|
-
* like jQuery plugins do, that's why all jQuery objects have these Angular-specific methods, not
|
|
2463
|
-
* only those returned from angular.element.
|
|
2464
|
-
* See: http://docs.angularjs.org/api/angular.element
|
|
2465
|
-
*/
|
|
2466
|
-
interface IAugmentedJQueryStatic extends JQueryStatic {}
|
|
2467
|
-
interface IAugmentedJQuery extends JQLite {}
|
|
2468
|
-
|
|
2469
|
-
/**
|
|
2470
|
-
* Same as IController. Keeping it for compatibility with older versions of these type definitions.
|
|
2471
|
-
*/
|
|
2472
|
-
interface IComponentController extends IController {}
|
|
2473
|
-
|
|
2474
1579
|
///////////////////////////////////////////////////////////////////////////
|
|
2475
1580
|
// AUTO module (angular.js)
|
|
2476
1581
|
///////////////////////////////////////////////////////////////////////////
|
|
@@ -2484,32 +1589,23 @@ declare namespace angular {
|
|
|
2484
1589
|
annotate(inlineAnnotatedFunction: any[]): string[];
|
|
2485
1590
|
get<T>(name: string, caller?: string): T;
|
|
2486
1591
|
get(name: "$anchorScroll"): IAnchorScrollService;
|
|
2487
|
-
get(name: "$cacheFactory"): ICacheFactoryService;
|
|
2488
1592
|
get(name: "$compile"): ICompileService;
|
|
2489
1593
|
get(name: "$controller"): IControllerService;
|
|
2490
|
-
get(name: "$document"): IDocumentService;
|
|
2491
1594
|
get(name: "$exceptionHandler"): IExceptionHandlerService;
|
|
2492
1595
|
get(name: "$filter"): IFilterService;
|
|
2493
1596
|
get(name: "$http"): IHttpService;
|
|
2494
|
-
get(name: "$httpBackend"): IHttpBackendService;
|
|
2495
1597
|
get(name: "$httpParamSerializer"): IHttpParamSerializer;
|
|
2496
|
-
get(name: "$httpParamSerializerJQLike"): IHttpParamSerializer;
|
|
2497
1598
|
get(name: "$interpolate"): IInterpolateService;
|
|
2498
|
-
get(name: "$interval"): IIntervalService;
|
|
2499
1599
|
get(name: "$locale"): ILocaleService;
|
|
2500
1600
|
get(name: "$location"): ILocationService;
|
|
2501
1601
|
get(name: "$log"): ILogService;
|
|
2502
1602
|
get(name: "$parse"): IParseService;
|
|
2503
|
-
get(name: "$q"): IQService;
|
|
2504
1603
|
get(name: "$rootElement"): IRootElementService;
|
|
2505
1604
|
get(name: "$rootScope"): IRootScopeService;
|
|
2506
1605
|
get(name: "$sce"): ISCEService;
|
|
2507
1606
|
get(name: "$sceDelegate"): ISCEDelegateService;
|
|
2508
1607
|
get(name: "$templateCache"): ITemplateCacheService;
|
|
2509
1608
|
get(name: "$templateRequest"): ITemplateRequestService;
|
|
2510
|
-
get(name: "$timeout"): ITimeoutService;
|
|
2511
|
-
get(name: "$window"): IWindowService;
|
|
2512
|
-
get<T>(name: "$xhrFactory"): IXhrFactory<T>;
|
|
2513
1609
|
has(name: string): boolean;
|
|
2514
1610
|
instantiate<T>(
|
|
2515
1611
|
typeConstructor: { new (...args: any[]): T },
|
|
@@ -2579,21 +1675,4 @@ declare namespace angular {
|
|
|
2579
1675
|
value(name: string, value: any): IServiceProvider;
|
|
2580
1676
|
}
|
|
2581
1677
|
}
|
|
2582
|
-
|
|
2583
|
-
/**
|
|
2584
|
-
* $http params serializer that converts objects to strings
|
|
2585
|
-
* see https://docs.angularjs.org/api/ng/service/$httpParamSerializer
|
|
2586
|
-
*/
|
|
2587
|
-
interface IHttpParamSerializer {
|
|
2588
|
-
(obj: Object): string;
|
|
2589
|
-
}
|
|
2590
|
-
|
|
2591
|
-
interface IFilterFunction extends Function {
|
|
2592
|
-
/**
|
|
2593
|
-
* By default, filters are only run once the input value changes. By marking the filter as `$stateful`, the filter will be run on every `$digest` to update the output. **This is strongly discouraged.**
|
|
2594
|
-
* See https://docs.angularjs.org/guide/filter#stateful-filters
|
|
2595
|
-
*/
|
|
2596
|
-
$stateful?: boolean | undefined;
|
|
2597
|
-
}
|
|
2598
|
-
type FilterFactory = (...I: any[]) => IFilterFunction;
|
|
2599
1678
|
}
|