@angular-wave/angular.ts 0.16.1 → 0.17.0

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.
Files changed (33) hide show
  1. package/@types/angular.d.ts +4 -0
  2. package/@types/animations/animate-css-driver.d.ts +10 -2
  3. package/@types/animations/animate-css.d.ts +8 -14
  4. package/@types/animations/animation.d.ts +1 -3
  5. package/@types/animations/cache/animate-cache.d.ts +99 -0
  6. package/@types/animations/cache/interface.d.ts +17 -0
  7. package/@types/animations/interface.d.ts +15 -18
  8. package/@types/animations/raf/raf-scheduler.d.ts +37 -0
  9. package/@types/core/compile/interface.d.ts +36 -5
  10. package/@types/core/interpolate/interface.d.ts +7 -1
  11. package/@types/core/scope/interface.d.ts +14 -4
  12. package/@types/core/scope/scope.d.ts +58 -22
  13. package/@types/directive/form/form.d.ts +16 -4
  14. package/@types/directive/model/model.d.ts +6 -4
  15. package/@types/filters/order-by.d.ts +13 -0
  16. package/@types/interface.d.ts +3 -3
  17. package/@types/router/path/path-node.d.ts +1 -1
  18. package/@types/router/resolve/resolve-context.d.ts +1 -1
  19. package/@types/router/transition/hook-registry.d.ts +1 -1
  20. package/@types/router/url/url-matcher.d.ts +1 -1
  21. package/@types/services/sce/interface.d.ts +1 -4
  22. package/@types/services/sce/sce.d.ts +7 -2
  23. package/@types/shared/common.d.ts +100 -39
  24. package/@types/shared/node.d.ts +5 -5
  25. package/@types/shared/strings.d.ts +2 -2
  26. package/dist/angular-ts.esm.js +1342 -901
  27. package/dist/angular-ts.umd.js +1342 -901
  28. package/dist/angular-ts.umd.min.js +1 -1
  29. package/dist/angular-ts.umd.min.js.gz +0 -0
  30. package/dist/angular-ts.umd.min.js.map +1 -1
  31. package/package.json +1 -1
  32. package/@types/animations/animate-cache.d.ts +0 -94
  33. package/@types/animations/raf-scheduler.d.ts +0 -35
@@ -65,7 +65,7 @@ export interface AngularBootstrapConfig {
65
65
  * This helps find bugs that would break under minified code.
66
66
  * Defaults to `false`.
67
67
  */
68
- strictDi?: boolean;
68
+ strictDi: boolean;
69
69
  }
70
70
  /**
71
71
  * A JavaScript expression represented as a string, typically used in interpolation bindings.
@@ -474,7 +474,7 @@ export interface TemplateLinkingFunction {
474
474
  ): Element;
475
475
  }
476
476
  export interface TemplateLinkingFunctionOptions {
477
- parentBoundTranscludeFn?: TranscludeFunctionObject | undefined;
477
+ _parentBoundTranscludeFn?: TranscludeFunctionObject | undefined;
478
478
  transcludeControllers?:
479
479
  | {
480
480
  [controller: string]: {
@@ -482,7 +482,7 @@ export interface TemplateLinkingFunctionOptions {
482
482
  };
483
483
  }
484
484
  | undefined;
485
- futureParentElement?: Element | undefined;
485
+ _futureParentElement?: Element | undefined;
486
486
  }
487
487
  /**
488
488
  * Configuration for ngModel behavior.
@@ -16,7 +16,7 @@ export class PathNode {
16
16
  /** Sets [[paramValues]] for the node, from the values of an object hash */
17
17
  applyRawParams(params: any): this;
18
18
  /** Gets a specific [[Param]] metadata that belongs to the node */
19
- parameter(name: any): undefined;
19
+ parameter(name: any): any;
20
20
  /**
21
21
  * @returns true if the state and parameter values for another PathNode are
22
22
  * equal to the state and param values for this PathNode
@@ -80,7 +80,7 @@ export class ResolveContext {
80
80
  * @returns {Promise<any>|any}
81
81
  */
82
82
  resolvePath(when: string, trans: any): Promise<any> | any;
83
- findNode(resolvable: any): undefined;
83
+ findNode(resolvable: any): any;
84
84
  /**
85
85
  * Gets the async dependencies of a Resolvable
86
86
  *
@@ -93,7 +93,7 @@ export class RegisteredHook {
93
93
  * retained: true,
94
94
  * }
95
95
  */
96
- _getDefaultMatchCriteria(): any;
96
+ _getDefaultMatchCriteria(): boolean[] | Record<string, boolean>;
97
97
  /**
98
98
  * Gets matching nodes as [[IMatchingNodes]]
99
99
  *
@@ -51,7 +51,7 @@
51
51
  */
52
52
  export class UrlMatcher {
53
53
  /** @internal Given a matcher, return an array with the matcher's path segments and path params, in order */
54
- static pathSegmentsAndParams(matcher: any): any;
54
+ static pathSegmentsAndParams(matcher: any): any[];
55
55
  /** @internal Given a matcher, return an array with the matcher's query params */
56
56
  static queryParams(matcher: any): any;
57
57
  /**
@@ -8,19 +8,16 @@ export interface SCEService {
8
8
  getTrusted(type: string, mayBeTrusted: any): any;
9
9
  getTrustedCss(value: any): any;
10
10
  getTrustedHtml(value: any): any;
11
- getTrustedJs(value: any): any;
12
11
  getTrustedResourceUrl(value: any): any;
13
12
  getTrustedUrl(value: any): any;
14
13
  getTrustedMediaUrl(value: any): any;
15
14
  parse(type: string, expression: string): (context: any, locals: any) => any;
16
15
  parseAsCss(expression: string): (context: any, locals: any) => any;
17
16
  parseAsHtml(expression: string): (context: any, locals: any) => any;
18
- parseAsJs(expression: string): (context: any, locals: any) => any;
19
17
  parseAsResourceUrl(expression: string): (context: any, locals: any) => any;
20
18
  parseAsUrl(expression: string): (context: any, locals: any) => any;
21
19
  trustAs(type: string, value: any): any;
22
20
  trustAsHtml(value: any): any;
23
- trustAsJs(value: any): any;
24
21
  trustAsResourceUrl(value: any): any;
25
22
  trustAsUrl(value: any): any;
26
23
  isEnabled(): boolean;
@@ -29,5 +26,5 @@ export interface SCEService {
29
26
  export interface SCEDelegateService {
30
27
  getTrusted(type: string, mayBeTrusted: any): any;
31
28
  trustAs(type: string, value: any): any;
32
- valueOf(value: any): any;
29
+ valueOf(value?: any): any;
33
30
  }
@@ -18,7 +18,13 @@ export class SceProvider {
18
18
  * Enables/disables SCE and returns the current value.
19
19
  */
20
20
  enabled: (value?: boolean | undefined, ...args: any[]) => boolean;
21
- $get: (string | (($parse: ng.ParseService, $sceDelegate: any) => any))[];
21
+ $get: (
22
+ | string
23
+ | ((
24
+ $parse: ng.ParseService,
25
+ $sceDelegate: ng.SCEDelegateService,
26
+ ) => ng.SCEService)
27
+ )[];
22
28
  }
23
29
  export namespace SCE_CONTEXTS {
24
30
  let HTML: string;
@@ -26,7 +32,6 @@ export namespace SCE_CONTEXTS {
26
32
  let MEDIA_URL: string;
27
33
  let URL: string;
28
34
  let RESOURCE_URL: string;
29
- let JS: string;
30
35
  }
31
36
  /**
32
37
  * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict
@@ -67,36 +67,83 @@ export function defaults(
67
67
  * var foo = { a: 1, b: 2, c: 3 };
68
68
  * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 }
69
69
  * ```
70
- * @param obj the source object
71
- * @param propNames an Array of strings, which are the whitelisted property names
70
+ * @param {any} obj the source object
71
+ * @param {string | any[]} propNames an Array of strings, which are the whitelisted property names
72
72
  */
73
- export function pick(obj: any, propNames: any): {};
73
+ export function pick(obj: any, propNames: string | any[]): Record<string, any>;
74
74
  /**
75
75
  * Return a copy of the object omitting the blacklisted properties.
76
+ * @example ```
77
+
78
+ var foo = { a: 1, b: 2, c: 3 };
79
+ var ab = omit(foo, ['a', 'b']); // { c: 3 }
80
+ ```
81
+ * @param {{ [x: string]: any; }} obj the source object
82
+ * @param {string | any[]} propNames an Array of strings, which are the blacklisted property names
83
+ */
84
+ export function omit(
85
+ obj: {
86
+ [x: string]: any;
87
+ },
88
+ propNames: string | any[],
89
+ ): Record<string, any>;
90
+ /**
91
+ * Filters an Array or an Object's properties based on a predicate
92
+ * @param {Record<string, any> | ArrayLike<any>} collection
93
+ * @param {{ (x: any): boolean; (item: any): boolean; (val: any, key: any): boolean; (arg0: any, arg1: string): any; }} callback
94
+ */
95
+ export function filter(
96
+ collection: Record<string, any> | ArrayLike<any>,
97
+ callback: {
98
+ (x: any): boolean;
99
+ (item: any): boolean;
100
+ (val: any, key: any): boolean;
101
+ (arg0: any, arg1: string): any;
102
+ },
103
+ ): Record<string, any>;
104
+ /**
105
+ * Finds an object from an array, or a property of an object, that matches a predicate
106
+ * @param {{ [s: string]: any; } | ArrayLike<any>} collection
107
+ * @param {function} callback
108
+ */
109
+ export function find(
110
+ collection:
111
+ | {
112
+ [s: string]: any;
113
+ }
114
+ | ArrayLike<any>,
115
+ callback: Function,
116
+ ): any;
117
+ /**
118
+ * Maps over an array or object and returns a new collection
119
+ * with the same shape.
76
120
  *
77
- * @example
78
- * ```
79
- *
80
- * var foo = { a: 1, b: 2, c: 3 };
81
- * var ab = omit(foo, ['a', 'b']); // { c: 3 }
82
- * ```
83
- * @param obj the source object
84
- * @param propNames an Array of strings, which are the blacklisted property names
121
+ * @template T
122
+ * @template R
123
+ * @param {T[] | Record<string, T>} collection
124
+ * @param {(value: T, key: string | number) => R} callback
125
+ * @param {R[] | Record<string, R>} [target]
126
+ * @returns {R[] | Record<string, R>}
85
127
  */
86
- export function omit(obj: any, propNames: any): {};
87
- /** Filters an Array or an Object's properties based on a predicate */
88
- export function filter(collection: any, callback: any): {};
89
- /** Finds an object from an array, or a property of an object, that matches a predicate */
90
- export function find(collection: any, callback: any): undefined;
91
- /** Maps an array or object properties using a callback function */
92
- export function map(collection: any, callback: any, target: any): any;
128
+ export function map<T, R>(
129
+ collection: T[] | Record<string, T>,
130
+ callback: (value: T, key: string | number) => R,
131
+ target?: R[] | Record<string, R>,
132
+ ): R[] | Record<string, R>;
93
133
  /**
94
134
  * Reduce function that pushes an object to an array, then returns the array.
95
135
  * Mostly just for [[flattenR]] and [[uniqR]]
136
+ * @param {any[]} arr
137
+ * @param {unknown} obj
138
+ */
139
+ export function pushR(arr: any[], obj: unknown): any[];
140
+ /**
141
+ * @param {(arg0: any) => any} predicateOrMap
142
+ * @param {string} errMsg
143
+ * @return {(obj:any) => any}
96
144
  */
97
- export function pushR(arr: any, obj: any): any;
98
145
  export function assertFn(
99
- predicateOrMap: any,
146
+ predicateOrMap: (arg0: any) => any,
100
147
  errMsg?: string,
101
148
  ): (obj: any) => any;
102
149
  /**
@@ -119,21 +166,28 @@ export function arrayTuples(...args: any[][]): any[][];
119
166
  * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration.
120
167
  *
121
168
  * Each keyValueTuple should be an array with values [ key: string, value: any ]
122
- *
123
- * @example
124
- * ```
125
- *
126
- * var pairs = [ ["fookey", "fooval"], ["barkey", "barval"] ]
127
- *
128
- * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {})
129
- * // pairsToObj == { fookey: "fooval", barkey: "barval" }
130
- *
131
- * // Or, more simply:
132
- * var pairsToObj = pairs.reduce(applyPairs, {})
133
- * // pairsToObj == { fookey: "fooval", barkey: "barval" }
134
- * ```
169
+ * @example ```
170
+
171
+ var pairs = [ ["fookey", "fooval"], ["barkey", "barval"] ]
172
+
173
+ var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {})
174
+ // pairsToObj == { fookey: "fooval", barkey: "barval" }
175
+
176
+ // Or, more simply:
177
+ var pairsToObj = pairs.reduce(applyPairs, {})
178
+ // pairsToObj == { fookey: "fooval", barkey: "barval" }
179
+ ```
180
+ * @param {{ [x: string]: any; }} memo
181
+ * @param {any[]} keyValTuple
135
182
  */
136
- export function applyPairs(memo: any, keyValTuple: any): any;
183
+ export function applyPairs(
184
+ memo: {
185
+ [x: string]: any;
186
+ },
187
+ keyValTuple: any[],
188
+ ): {
189
+ [x: string]: any;
190
+ };
137
191
  /**
138
192
  * Returns the last element of an array, or undefined if the array is empty.
139
193
  * @template T
@@ -143,15 +197,22 @@ export function applyPairs(memo: any, keyValTuple: any): any;
143
197
  export function tail<T>(arr: any[] | string): T | undefined;
144
198
  /**
145
199
  * shallow copy from src to dest
200
+ * @param {any} src
201
+ * @param {any} dest
146
202
  */
147
203
  export function copy(src: any, dest: any): any;
148
204
  export function allTrueR(memo: any, elem: any): any;
149
205
  export function anyTrueR(memo: any, elem: any): any;
150
- export function unnestR(memo: any, elem: any): any;
151
- export function flattenR(memo: any, elem: any): any;
152
- export function uniqR(acc: any, token: any): any;
153
- export function unnest(arr: any): any;
206
+ export function unnestR<T>(memo: T[], elem: T | T[]): T[];
207
+ export function flattenR<T>(memo: T[], elem: any): T[];
208
+ export function uniqR(acc: any[], token: any): any[];
209
+ export function unnest(arr: any[]): any;
210
+ /**
211
+ * @param {(arg0: any) => any} predicateOrMap
212
+ * @param {string} errMsg
213
+ * @return {(obj:any) => any}
214
+ */
154
215
  export function assertPredicate(
155
- predicateOrMap: any,
216
+ predicateOrMap: (arg0: any) => any,
156
217
  errMsg?: string,
157
218
  ): (obj: any) => any;
@@ -1,8 +1,8 @@
1
1
  export type NodeType = number;
2
2
  export namespace NodeType {
3
- let _ELEMENT_NODE: 1;
4
- let _DOCUMENT_NODE: 9;
5
- let _TEXT_NODE: 3;
6
- let _COMMENT_NODE: 8;
7
- let _DOCUMENT_FRAGMENT_NODE: 11;
3
+ let _ELEMENT_NODE: number;
4
+ let _DOCUMENT_NODE: number;
5
+ let _TEXT_NODE: number;
6
+ let _COMMENT_NODE: number;
7
+ let _DOCUMENT_FRAGMENT_NODE: number;
8
8
  }
@@ -64,8 +64,8 @@ export function splitOnDelim(
64
64
  * let arr = ["foo", "bar", 1, "baz", "", "qux" ];
65
65
  * arr.reduce(joinNeighborsR, []) // ["foobar", 1, "bazqux" ]
66
66
  * ```
67
- * @param {string | any[]} acc
67
+ * @param {any[]} acc
68
68
  * @param {unknown} str
69
69
  */
70
- export function joinNeighborsR(acc: string | any[], str: unknown): any;
70
+ export function joinNeighborsR(acc: any[], str: unknown): any[];
71
71
  export function stripLastPathElement(str: string): string;