@angular-wave/angular.ts 0.2.1 → 0.2.2

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.
@@ -6,18 +6,42 @@ export function identifierForController(controller: any, ident: any): any;
6
6
  * This provider allows controller registration via the
7
7
  * {@link ng.$controllerProvider#register register} method.
8
8
  */
9
- export function $ControllerProvider(): void;
10
9
  export class $ControllerProvider {
11
10
  /**
11
+ * @type {Map<string, Function|Object>}
12
+ * @private
13
+ */
14
+ private controllers;
15
+ /**
16
+ * Check if a controller with a given name exists.
17
+ *
12
18
  * @param {string} name Controller name to check.
19
+ * @returns {boolean} True if the controller exists, false otherwise.
13
20
  */
14
- has: (name: string) => any;
21
+ has(name: string): boolean;
15
22
  /**
23
+ * Register a controller.
24
+ *
16
25
  * @param {string|Object} name Controller name, or an object map of controllers where the keys are
17
26
  * the names and the values are the constructors.
18
- * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
27
+ * @param {Function|Array} constructor Controller constructor function (optionally decorated with DI
19
28
  * annotations in the array notation).
20
29
  */
21
- register: (name: string | any, constructor: Function | any[]) => void;
22
- $get: (string | (($injector: import("../../core/di/internal-injector").InjectorService) => (expression: Function | string, locals: any, later: any, ident: any) => any))[];
30
+ register(name: string | any, constructor: Function | any[]): void;
31
+ /**
32
+ * $get method for dependency injection.
33
+ *
34
+ * @param {import("../../core/di/internal-injector").InjectorService} $injector
35
+ * @returns {Function} A service function that creates controllers.
36
+ */
37
+ $get: (string | (($injector: any) => (expression: any, locals: any, later: any, ident: any) => any))[];
38
+ /**
39
+ * Adds an identifier to the controller instance in the given locals' scope.
40
+ *
41
+ * @param {Object} locals The locals object containing the scope.
42
+ * @param {string} identifier The identifier to assign.
43
+ * @param {Object} instance The controller instance.
44
+ * @param {string} name The name of the controller.
45
+ */
46
+ addIdentifier(locals: any, identifier: string, instance: any, name: string): void;
23
47
  }
@@ -68,18 +68,18 @@ export class ResolveContext {
68
68
  *
69
69
  * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.
70
70
  *
71
- * @param newResolvables the new Resolvables
71
+ * @param {Resolvable[]} newResolvables the new Resolvables
72
72
  * @param state Used to find the node to put the resolvable on
73
73
  */
74
- addResolvables(newResolvables: any, state: any): void;
74
+ addResolvables(newResolvables: Resolvable[], state: any): void;
75
75
  /**
76
76
  * Returns a promise for an array of resolved path Element promises
77
77
  *
78
- * @param when
78
+ * @param {string} when
79
79
  * @param trans
80
- * @returns {Promise<any>|any}
80
+ * @returns {import("../../core/q/q").QPromise<any>|any}
81
81
  */
82
- resolvePath(when: string, trans: any): Promise<any> | any;
82
+ resolvePath(when: string, trans: any): import("../../core/q/q").QPromise<any> | any;
83
83
  injector(): UIInjectorImpl;
84
84
  _injector: UIInjectorImpl;
85
85
  findNode(resolvable: any): undefined;
@@ -87,9 +87,12 @@ export class ResolveContext {
87
87
  * Gets the async dependencies of a Resolvable
88
88
  *
89
89
  * Given a Resolvable, returns its dependencies as a Resolvable[]
90
+ * @param {Resolvable} resolvable
91
+ * @returns {Resolvable[]}
90
92
  */
91
- getDependencies(resolvable: any): any;
93
+ getDependencies(resolvable: Resolvable): Resolvable[];
92
94
  }
95
+ import { Resolvable } from "./resolvable";
93
96
  declare class UIInjectorImpl {
94
97
  native: import("../../core/di/internal-injector").InjectorService;
95
98
  get(token: any): any;
@@ -177,8 +177,6 @@ export const removeFrom: any;
177
177
  export const pushTo: any;
178
178
  export function deregAll(functions: any): any;
179
179
  export function mergeR(memo: any, item: any): any;
180
- /** Maps an array or object properties using a callback function */
181
- export function mapObj(collection: any, callback: any, target: any): any;
182
180
  export function allTrueR(memo: any, elem: any): any;
183
181
  export function anyTrueR(memo: any, elem: any): any;
184
182
  export function unnestR(memo: any, elem: any): any;
@@ -368,14 +368,6 @@ export function csp(): any;
368
368
  * @param {String} context the context in which the name is used, such as module or directive
369
369
  */
370
370
  export function assertNotHasOwnProperty(name: string, context: string): void;
371
- /**
372
- * Return the value accessible from the object by path. Any undefined traversals are ignored
373
- * @param {Object} obj starting object
374
- * @param {String} path path to traverse
375
- * @param {boolean} [bindFnToScope=true]
376
- * @returns {Object} value as accessible by path
377
- */
378
- export function getter(obj: any, path: string, bindFnToScope?: boolean): any;
379
371
  export function stringify(value: any): any;
380
372
  /**
381
373
  * @param {Number} maxDepth