@angular-wave/angular.ts 0.16.1 → 0.18.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 (51) 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/animate-js-driver.d.ts +10 -2
  5. package/@types/animations/animate.d.ts +1 -1
  6. package/@types/animations/animation.d.ts +2 -5
  7. package/@types/animations/cache/animate-cache.d.ts +99 -0
  8. package/@types/animations/cache/interface.d.ts +17 -0
  9. package/@types/animations/interface.d.ts +22 -20
  10. package/@types/animations/queue/animate-queue.d.ts +1 -1
  11. package/@types/animations/raf/raf-scheduler.d.ts +37 -0
  12. package/@types/animations/shared.d.ts +1 -1
  13. package/@types/core/compile/attributes.d.ts +4 -4
  14. package/@types/core/compile/compile.d.ts +3 -3
  15. package/@types/core/compile/interface.d.ts +36 -5
  16. package/@types/core/interpolate/interface.d.ts +7 -1
  17. package/@types/core/interpolate/interpolate.d.ts +1 -1
  18. package/@types/core/scope/interface.d.ts +14 -4
  19. package/@types/core/scope/scope.d.ts +58 -22
  20. package/@types/directive/aria/aria.d.ts +1 -1
  21. package/@types/directive/form/form.d.ts +16 -4
  22. package/@types/directive/messages/messages.d.ts +13 -13
  23. package/@types/directive/model/model.d.ts +6 -4
  24. package/@types/filters/order-by.d.ts +13 -0
  25. package/@types/interface.d.ts +3 -4
  26. package/@types/namespace.d.ts +7 -13
  27. package/@types/router/directives/view-directive.d.ts +2 -2
  28. package/@types/router/path/path-node.d.ts +1 -1
  29. package/@types/router/resolve/resolve-context.d.ts +1 -1
  30. package/@types/router/state/state-object.d.ts +2 -2
  31. package/@types/router/transition/hook-registry.d.ts +1 -1
  32. package/@types/router/url/url-matcher.d.ts +1 -1
  33. package/@types/services/anchor-scroll/anchor-scroll.d.ts +1 -1
  34. package/@types/services/anchor-scroll/interface.d.ts +5 -8
  35. package/@types/services/http/http.d.ts +1 -1
  36. package/@types/services/location/location.d.ts +1 -1
  37. package/@types/services/sce/interface.d.ts +3 -6
  38. package/@types/services/sce/sce.d.ts +7 -2
  39. package/@types/shared/common.d.ts +100 -39
  40. package/@types/shared/node.d.ts +5 -5
  41. package/@types/shared/strings.d.ts +2 -2
  42. package/dist/angular-ts.esm.js +1584 -1181
  43. package/dist/angular-ts.umd.js +1584 -1181
  44. package/dist/angular-ts.umd.min.js +1 -1
  45. package/dist/angular-ts.umd.min.js.gz +0 -0
  46. package/dist/angular-ts.umd.min.js.map +1 -1
  47. package/package.json +1 -1
  48. package/@types/animations/animate-cache.d.ts +0 -94
  49. package/@types/animations/raf-scheduler.d.ts +0 -35
  50. package/@types/router/scroll/interface.d.ts +0 -3
  51. package/@types/router/scroll/view-scroll.d.ts +0 -8
@@ -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;