@angular-wave/angular.ts 0.17.0 → 0.19.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 (113) hide show
  1. package/@types/angular.d.ts +18 -6
  2. package/@types/animations/animate-css-driver.d.ts +2 -2
  3. package/@types/animations/animate-js-driver.d.ts +21 -3
  4. package/@types/animations/animate-js.d.ts +10 -2
  5. package/@types/animations/animate-swap.d.ts +4 -1
  6. package/@types/animations/animate.d.ts +11 -5
  7. package/@types/animations/animation.d.ts +8 -2
  8. package/@types/animations/css/animate-css.d.ts +16 -0
  9. package/@types/animations/interface.d.ts +315 -21
  10. package/@types/animations/queue/animate-queue.d.ts +17 -8
  11. package/@types/animations/queue/interface.d.ts +14 -7
  12. package/@types/animations/shared.d.ts +1 -1
  13. package/@types/core/compile/attributes.d.ts +5 -5
  14. package/@types/core/compile/compile.d.ts +28 -18
  15. package/@types/core/compile/interface.d.ts +209 -34
  16. package/@types/core/controller/controller.d.ts +30 -38
  17. package/@types/core/controller/interface.d.ts +12 -3
  18. package/@types/core/interpolate/interpolate.d.ts +1 -1
  19. package/@types/core/parse/interface.d.ts +2 -2
  20. package/@types/core/parse/interpreter.d.ts +110 -58
  21. package/@types/core/scope/interface.d.ts +6 -0
  22. package/@types/core/scope/scope.d.ts +2 -1
  23. package/@types/directive/aria/aria.d.ts +67 -27
  24. package/@types/directive/aria/interface.d.ts +9 -0
  25. package/@types/directive/class/class.d.ts +31 -0
  26. package/@types/directive/form/form.d.ts +54 -18
  27. package/@types/directive/input/input.d.ts +59 -18
  28. package/@types/directive/input/interface.d.ts +10 -0
  29. package/@types/directive/messages/messages.d.ts +73 -22
  30. package/@types/directive/model/interface.d.ts +19 -0
  31. package/@types/directive/model/model.d.ts +70 -33
  32. package/@types/directive/model-options/model-options.d.ts +1 -23
  33. package/@types/directive/repeat/repeat.d.ts +2 -3
  34. package/@types/directive/validators/validators.d.ts +1 -5
  35. package/@types/directive/worker/interface.d.ts +9 -0
  36. package/@types/docs.d.ts +24 -0
  37. package/@types/filters/json.d.ts +4 -0
  38. package/@types/interface.d.ts +22 -70
  39. package/@types/namespace.d.ts +73 -53
  40. package/@types/router/common/trace.d.ts +150 -42
  41. package/@types/router/directives/state-directives.d.ts +4 -4
  42. package/@types/router/directives/view-directive.d.ts +4 -7
  43. package/@types/router/hooks/core-resolvables.d.ts +11 -2
  44. package/@types/router/hooks/ignored-transition.d.ts +3 -1
  45. package/@types/router/hooks/invalid-transition.d.ts +3 -1
  46. package/@types/router/hooks/lazy-load.d.ts +17 -13
  47. package/@types/router/hooks/on-enter-exit-retain.d.ts +9 -3
  48. package/@types/router/hooks/redirect-to.d.ts +3 -3
  49. package/@types/router/hooks/resolve.d.ts +11 -3
  50. package/@types/router/hooks/views.d.ts +6 -4
  51. package/@types/router/params/interface.d.ts +3 -2
  52. package/@types/router/params/param-factory.d.ts +24 -3
  53. package/@types/router/params/param-type.d.ts +47 -11
  54. package/@types/router/params/param-types.d.ts +52 -0
  55. package/@types/router/params/param.d.ts +52 -28
  56. package/@types/router/params/state-params.d.ts +5 -3
  57. package/@types/router/path/interface.d.ts +3 -0
  58. package/@types/router/path/path-node.d.ts +34 -14
  59. package/@types/router/path/path-utils.d.ts +75 -25
  60. package/@types/router/resolve/resolvable.d.ts +34 -7
  61. package/@types/router/resolve/resolve-context.d.ts +52 -34
  62. package/@types/router/router.d.ts +10 -12
  63. package/@types/router/state/interface.d.ts +194 -31
  64. package/@types/router/state/state-builder.d.ts +29 -29
  65. package/@types/router/state/state-matcher.d.ts +29 -11
  66. package/@types/router/state/state-object.d.ts +68 -22
  67. package/@types/router/state/state-queue-manager.d.ts +19 -10
  68. package/@types/router/state/state-registry.d.ts +80 -28
  69. package/@types/router/state/state-service.d.ts +182 -123
  70. package/@types/router/state/target-state.d.ts +36 -27
  71. package/@types/router/state/views.d.ts +48 -19
  72. package/@types/router/template-factory.d.ts +8 -15
  73. package/@types/router/transition/hook-builder.d.ts +17 -6
  74. package/@types/router/transition/hook-registry.d.ts +80 -46
  75. package/@types/router/transition/interface.d.ts +138 -118
  76. package/@types/router/transition/reject-factory.d.ts +58 -22
  77. package/@types/router/transition/transition-event-type.d.ts +19 -8
  78. package/@types/router/transition/transition-hook.d.ts +50 -29
  79. package/@types/router/transition/transition-service.d.ts +186 -30
  80. package/@types/router/transition/transition.d.ts +201 -70
  81. package/@types/router/url/interface.d.ts +140 -0
  82. package/@types/router/url/url-config.d.ts +19 -16
  83. package/@types/router/url/url-matcher.d.ts +66 -46
  84. package/@types/router/url/url-rule.d.ts +58 -35
  85. package/@types/router/url/url-rules.d.ts +38 -28
  86. package/@types/router/url/url-service.d.ts +68 -41
  87. package/@types/router/view/interface.d.ts +10 -30
  88. package/@types/router/view/view.d.ts +35 -21
  89. package/@types/services/anchor-scroll/anchor-scroll.d.ts +1 -1
  90. package/@types/services/anchor-scroll/interface.d.ts +5 -8
  91. package/@types/services/http/http.d.ts +20 -23
  92. package/@types/services/http/interface.d.ts +11 -23
  93. package/@types/services/location/interface.d.ts +1 -4
  94. package/@types/services/location/location.d.ts +14 -14
  95. package/@types/services/sce/interface.d.ts +2 -2
  96. package/@types/services/sce/sce.d.ts +16 -10
  97. package/@types/services/template-request/template-request.d.ts +21 -4
  98. package/@types/shared/common.d.ts +5 -32
  99. package/@types/shared/dom.d.ts +10 -5
  100. package/@types/shared/interface.d.ts +4 -0
  101. package/@types/shared/utils.d.ts +17 -6
  102. package/dist/angular-ts.esm.js +6643 -3107
  103. package/dist/angular-ts.umd.js +6643 -3107
  104. package/dist/angular-ts.umd.min.js +1 -1
  105. package/dist/angular-ts.umd.min.js.gz +0 -0
  106. package/dist/angular-ts.umd.min.js.map +1 -1
  107. package/package.json +1 -2
  108. package/@types/animations/animate-css.d.ts +0 -11
  109. package/@types/filters/filters.d.ts +0 -38
  110. package/@types/router/hooks/update-globals.d.ts +0 -1
  111. package/@types/router/hooks/url.d.ts +0 -5
  112. package/@types/router/scroll/interface.d.ts +0 -3
  113. package/@types/router/scroll/view-scroll.d.ts +0 -8
@@ -31,198 +31,250 @@ export class ASTInterpreter {
31
31
  * Unary plus operation.
32
32
  * @param {function} argument - The argument function.
33
33
  * @param {Object} [context] - The context.
34
- * @returns {function} The unary plus function.
34
+ * @returns {CompiledExpressionFunction} The unary plus function.
35
35
  */
36
- "unary+"(argument: Function, context?: any): Function;
36
+ "unary+"(argument: Function, context?: any): CompiledExpressionFunction;
37
37
  /**
38
38
  * Unary minus operation.
39
39
  * @param {function} argument - The argument function.
40
40
  * @param {Object} [context] - The context.
41
- * @returns {function} The unary minus function.
41
+ * @returns {CompiledExpressionFunction} The unary minus function.
42
42
  */
43
- "unary-"(argument: Function, context?: any): Function;
43
+ "unary-"(argument: Function, context?: any): CompiledExpressionFunction;
44
44
  /**
45
45
  * Unary negation operation.
46
46
  * @param {function} argument - The argument function.
47
47
  * @param {Object} [context] - The context.
48
- * @returns {function} The unary negation function.
48
+ * @returns {CompiledExpressionFunction} The unary negation function.
49
49
  */
50
- "unary!"(argument: Function, context?: any): Function;
50
+ "unary!"(argument: Function, context?: any): CompiledExpressionFunction;
51
51
  /**
52
52
  * Binary plus operation.
53
53
  * @param {function} left - The left operand function.
54
54
  * @param {function} right - The right operand function.
55
55
  * @param {Object} [context] - The context.
56
- * @returns {function} The binary plus function.
56
+ * @returns {CompiledExpressionFunction} The binary plus function.
57
57
  */
58
- "binary+"(left: Function, right: Function, context?: any): Function;
58
+ "binary+"(
59
+ left: Function,
60
+ right: Function,
61
+ context?: any,
62
+ ): CompiledExpressionFunction;
59
63
  /**
60
64
  * Binary minus operation.
61
65
  * @param {function} left - The left operand function.
62
66
  * @param {function} right - The right operand function.
63
67
  * @param {Object} [context] - The context.
64
- * @returns {function} The binary minus function.
68
+ * @returns {CompiledExpressionFunction} The binary minus function.
65
69
  */
66
- "binary-"(left: Function, right: Function, context?: any): Function;
70
+ "binary-"(
71
+ left: Function,
72
+ right: Function,
73
+ context?: any,
74
+ ): CompiledExpressionFunction;
67
75
  /**
68
76
  * Binary multiplication operation.
69
77
  * @param {function} left - The left operand function.
70
78
  * @param {function} right - The right operand function.
71
79
  * @param {Object} [context] - The context.
72
- * @returns {function} The binary multiplication function.
80
+ * @returns {CompiledExpressionFunction} The binary multiplication function.
73
81
  */
74
- "binary*"(left: Function, right: Function, context?: any): Function;
75
- "binary/"(
76
- left: any,
77
- right: any,
78
- context: any,
79
- ): (
80
- scope: any,
81
- locals: any,
82
- assign: any,
83
- ) =>
84
- | number
85
- | {
86
- value: number;
87
- };
82
+ "binary*"(
83
+ left: Function,
84
+ right: Function,
85
+ context?: any,
86
+ ): CompiledExpressionFunction;
88
87
  /**
89
88
  * Binary division operation.
90
89
  * @param {function} left - The left operand function.
91
90
  * @param {function} right - The right operand function.
92
91
  * @param {Object} [context] - The context.
93
- * @returns {function} The binary division function.
92
+ * @returns {CompiledExpressionFunction} The binary division function.
94
93
  */
95
- "binary%"(left: Function, right: Function, context?: any): Function;
94
+ "binary/"(
95
+ left: Function,
96
+ right: Function,
97
+ context?: any,
98
+ ): CompiledExpressionFunction;
99
+ /**
100
+ * Binary modulo operation.
101
+ * @param {function} left - The left operand function.
102
+ * @param {function} right - The right operand function.
103
+ * @param {Object} [context] - The context.
104
+ * @returns {CompiledExpressionFunction} The binary division function.
105
+ */
106
+ "binary%"(
107
+ left: Function,
108
+ right: Function,
109
+ context?: any,
110
+ ): CompiledExpressionFunction;
96
111
  /**
97
112
  * Binary strict equality operation.
98
113
  * @param {function} left - The left operand function.
99
114
  * @param {function} right - The right operand function.
100
115
  * @param {Object} [context] - The context.
101
- * @returns {function} The binary strict equality function.
116
+ * @returns {CompiledExpressionFunction} The binary strict equality function.
102
117
  */
103
- "binary==="(left: Function, right: Function, context?: any): Function;
118
+ "binary==="(
119
+ left: Function,
120
+ right: Function,
121
+ context?: any,
122
+ ): CompiledExpressionFunction;
104
123
  /**
105
124
  * Binary strict inequality operation.
106
125
  * @param {function} left - The left operand function.
107
126
  * @param {function} right - The right operand function.
108
127
  * @param {Object} [context] - The context.
109
- * @returns {function} The binary strict inequality function.
128
+ * @returns {CompiledExpressionFunction} The binary strict inequality function.
110
129
  */
111
- "binary!=="(left: Function, right: Function, context?: any): Function;
130
+ "binary!=="(
131
+ left: Function,
132
+ right: Function,
133
+ context?: any,
134
+ ): CompiledExpressionFunction;
112
135
  /**
113
136
  * Binary equality operation.
114
137
  * @param {function} left - The left operand function.
115
138
  * @param {function} right - The right operand function.
116
139
  * @param {Object} [context] - The context.
117
- * @returns {function} The binary equality function.
140
+ * @returns {CompiledExpressionFunction} The binary equality function.
118
141
  */
119
- "binary=="(left: Function, right: Function, context?: any): Function;
142
+ "binary=="(
143
+ left: Function,
144
+ right: Function,
145
+ context?: any,
146
+ ): CompiledExpressionFunction;
120
147
  /**
121
148
  * Binary inequality operation.
122
149
  * @param {function} left - The left operand function.
123
150
  * @param {function} right - The right operand function.
124
151
  * @param {Object} [context] - The context.
125
- * @returns {function} The binary inequality function.
152
+ * @returns {CompiledExpressionFunction} The binary inequality function.
126
153
  */
127
- "binary!="(left: Function, right: Function, context?: any): Function;
154
+ "binary!="(
155
+ left: Function,
156
+ right: Function,
157
+ context?: any,
158
+ ): CompiledExpressionFunction;
128
159
  /**
129
160
  * Binary less-than operation.
130
161
  * @param {function} left - The left operand function.
131
162
  * @param {function} right - The right operand function.
132
163
  * @param {Object} [context] - The context.
133
- * @returns {function} The binary less-than function.
164
+ * @returns {CompiledExpressionFunction} The binary less-than function.
134
165
  */
135
- "binary<"(left: Function, right: Function, context?: any): Function;
166
+ "binary<"(
167
+ left: Function,
168
+ right: Function,
169
+ context?: any,
170
+ ): CompiledExpressionFunction;
136
171
  /**
137
172
  * Binary greater-than operation.
138
173
  * @param {function} left - The left operand function.
139
174
  * @param {function} right - The right operand function.
140
175
  * @param {Object} [context] - The context.
141
- * @returns {function} The binary greater-than function.
176
+ * @returns {CompiledExpressionFunction} The binary greater-than function.
142
177
  */
143
- "binary>"(left: Function, right: Function, context?: any): Function;
178
+ "binary>"(
179
+ left: Function,
180
+ right: Function,
181
+ context?: any,
182
+ ): CompiledExpressionFunction;
144
183
  /**
145
184
  * Binary less-than-or-equal-to operation.
146
185
  * @param {function} left - The left operand function.
147
186
  * @param {function} right - The right operand function.
148
187
  * @param {Object} [context] - The context.
149
- * @returns {function} The binary less-than-or-equal-to function.
188
+ * @returns {CompiledExpressionFunction} The binary less-than-or-equal-to function.
150
189
  */
151
- "binary<="(left: Function, right: Function, context?: any): Function;
190
+ "binary<="(
191
+ left: Function,
192
+ right: Function,
193
+ context?: any,
194
+ ): CompiledExpressionFunction;
152
195
  /**
153
196
  * Binary greater-than-or-equal-to operation.
154
197
  * @param {function} left - The left operand function.
155
198
  * @param {function} right - The right operand function.
156
199
  * @param {Object} [context] - The context.
157
- * @returns {function} The binary greater-than-or-equal-to function.
200
+ * @returns {CompiledExpressionFunction} The binary greater-than-or-equal-to function.
158
201
  */
159
- "binary>="(left: Function, right: Function, context?: any): Function;
202
+ "binary>="(
203
+ left: Function,
204
+ right: Function,
205
+ context?: any,
206
+ ): CompiledExpressionFunction;
160
207
  /**
161
208
  * Binary logical AND operation.
162
209
  * @param {function} left - The left operand function.
163
210
  * @param {function} right - The right operand function.
164
211
  * @param {Object} [context] - The context.
165
- * @returns {function} The binary logical AND function.
212
+ * @returns {CompiledExpressionFunction} The binary logical AND function.
166
213
  */
167
- "binary&&"(left: Function, right: Function, context?: any): Function;
214
+ "binary&&"(
215
+ left: Function,
216
+ right: Function,
217
+ context?: any,
218
+ ): CompiledExpressionFunction;
168
219
  /**
169
220
  * Binary logical OR operation.
170
221
  * @param {function} left - The left operand function.
171
222
  * @param {function} right - The right operand function.
172
223
  * @param {Object} [context] - The context.
173
- * @returns {function} The binary logical OR function.
224
+ * @returns {CompiledExpressionFunction} The binary logical OR function.
174
225
  */
175
- "binary||"(left: Function, right: Function, context?: any): Function;
226
+ "binary||"(
227
+ left: Function,
228
+ right: Function,
229
+ context?: any,
230
+ ): CompiledExpressionFunction;
176
231
  /**
177
232
  * Ternary conditional operation.
178
233
  * @param {function} test - The test function.
179
234
  * @param {function} alternate - The alternate function.
180
235
  * @param {function} consequent - The consequent function.
181
236
  * @param {Object} [context] - The context.
182
- * @returns {function} The ternary conditional function.
237
+ * @returns {CompiledExpressionFunction} The ternary conditional function.
183
238
  */
184
239
  "ternary?:"(
185
240
  test: Function,
186
241
  alternate: Function,
187
242
  consequent: Function,
188
243
  context?: any,
189
- ): Function;
244
+ ): CompiledExpressionFunction;
190
245
  /**
191
246
  * Returns the value of a literal.
192
247
  * @param {*} value - The literal value.
193
248
  * @param {Object} [context] - The context.
194
- * @returns {import("./interface.ts").CompiledExpressionFunction} The function returning the literal value.
249
+ * @returns {CompiledExpressionFunction} The function returning the literal value.
195
250
  */
196
- value(
197
- value: any,
198
- context?: any,
199
- ): import("./interface.ts").CompiledExpressionFunction;
251
+ value(value: any, context?: any): CompiledExpressionFunction;
200
252
  /**
201
253
  * Returns the value of an identifier.
202
254
  * @param {string} name - The identifier name.
203
255
  * @param {Object} [context] - The context.
204
256
  * @param {boolean|1} [create] - Whether to create the identifier if it does not exist.
205
- * @returns {import("./interface.ts").CompiledExpressionFunction} The function returning the identifier value.
257
+ * @returns {CompiledExpressionFunction} The function returning the identifier value.
206
258
  */
207
259
  identifier(
208
260
  name: string,
209
261
  context?: any,
210
262
  create?: boolean | 1,
211
- ): import("./interface.ts").CompiledExpressionFunction;
263
+ ): CompiledExpressionFunction;
212
264
  /**
213
265
  * Returns the value of a non-computed member expression.
214
266
  * @param {function} left - The left operand function.
215
267
  * @param {string} right - The right operand function.
216
268
  * @param {Object} [context] - The context.
217
269
  * @param {boolean|1} [create] - Whether to create the member if it does not exist.
218
- * @returns {function} The function returning the non-computed member value.
270
+ * @returns {CompiledExpressionFunction} The function returning the non-computed member value.
219
271
  */
220
272
  nonComputedMember(
221
273
  left: Function,
222
274
  right: string,
223
275
  context?: any,
224
276
  create?: boolean | 1,
225
- ): Function;
277
+ ): CompiledExpressionFunction;
226
278
  #private;
227
279
  }
228
280
  export type ASTNode = import("./ast/ast-node.ts").ASTNode;
@@ -47,3 +47,9 @@ export interface ScopeEvent {
47
47
  */
48
48
  defaultPrevented: boolean;
49
49
  }
50
+ export type ScopeProxied<T extends object> = T & {
51
+ /** The Scope handler instance (your Proxy handler) */
52
+ $handler: ng.Scope;
53
+ /** The raw target object behind the proxy */
54
+ $target: T;
55
+ };
@@ -129,12 +129,13 @@ export class Scope {
129
129
  * @param {string} watchProp - An expression to be watched in the context of this model.
130
130
  * @param {ng.ListenerFn} [listenerFn] - A function to execute when changes are detected on watched context.
131
131
  * @param {boolean} [lazy] - A flag to indicate if the listener should be invoked immediately. Defaults to false.
132
+ * @return {(() => void) | undefined} - A function to deregister the watcher, or undefined if no listener function is provided.
132
133
  */
133
134
  $watch(
134
135
  watchProp: string,
135
136
  listenerFn?: ng.ListenerFn,
136
137
  lazy?: boolean,
137
- ): () => void;
138
+ ): (() => void) | undefined;
138
139
  /**
139
140
  * @param {ng.Scope} [childInstance]
140
141
  * @returns {Proxy<ng.Scope> & ng.Scope}
@@ -18,20 +18,37 @@ export function AriaProvider(): void;
18
18
  export class AriaProvider {
19
19
  config: (newConfig: any) => void;
20
20
  $get: () => {
21
- config(key: any): any;
22
- $$watchExpr: (
23
- attrName: any,
21
+ /**
22
+ * @param {string | number} key
23
+ */
24
+ config(key: string | number): any;
25
+ _watchExpr: (
26
+ attrName: string | number,
24
27
  ariaAttr: any,
25
- nativeAriaNodeNamesParam: any,
28
+ nativeAriaNodeNamesParam: string | any[],
26
29
  negate: any,
27
- ) => (scope: any, elem: any, attr: any) => void;
30
+ ) => (
31
+ /** @type {ng.Scope} */ scope: ng.Scope,
32
+ /** @type {HTMLElement} */ elem: HTMLElement,
33
+ /** @type {ng.Attributes} */ attr: ng.Attributes,
34
+ ) => void;
28
35
  };
29
36
  }
30
- export function ngDisabledAriaDirective($aria: any): any;
37
+ /**
38
+ * @param {ng.AriaService} $aria
39
+ */
40
+ export function ngDisabledAriaDirective(
41
+ $aria: ng.AriaService,
42
+ ): (scope: ng.Scope, elem: HTMLElement, attr: ng.Attributes) => void;
31
43
  export namespace ngDisabledAriaDirective {
32
44
  let $inject: string[];
33
45
  }
34
- export function ngShowAriaDirective($aria: any): any;
46
+ /**
47
+ * @param {ng.AriaService} $aria
48
+ */
49
+ export function ngShowAriaDirective(
50
+ $aria: ng.AriaService,
51
+ ): (scope: ng.Scope, elem: HTMLElement, attr: ng.Attributes) => void;
35
52
  export namespace ngShowAriaDirective {
36
53
  let $inject_1: string[];
37
54
  export { $inject_1 as $inject };
@@ -41,61 +58,84 @@ export namespace ngShowAriaDirective {
41
58
  */
42
59
  export function ngMessagesAriaDirective(): ng.Directive;
43
60
  /**
44
- * @param $aria
61
+ * @param {ng.AriaService} $aria
45
62
  * @param {ng.ParseService} $parse
46
63
  * @return {ng.Directive}
47
64
  */
48
65
  export function ngClickAriaDirective(
49
- $aria: any,
66
+ $aria: ng.AriaService,
50
67
  $parse: ng.ParseService,
51
68
  ): ng.Directive;
52
69
  export namespace ngClickAriaDirective {
53
70
  let $inject_2: string[];
54
71
  export { $inject_2 as $inject };
55
72
  }
56
- export function ngRequiredAriaDirective($aria: any): any;
73
+ /**
74
+ * @param {ng.AriaService} $aria
75
+ */
76
+ export function ngRequiredAriaDirective(
77
+ $aria: ng.AriaService,
78
+ ): (scope: ng.Scope, elem: HTMLElement, attr: ng.Attributes) => void;
57
79
  export namespace ngRequiredAriaDirective {
58
80
  let $inject_3: string[];
59
81
  export { $inject_3 as $inject };
60
82
  }
61
- export function ngCheckedAriaDirective($aria: any): any;
83
+ /**
84
+ * @param {ng.AriaService} $aria
85
+ */
86
+ export function ngCheckedAriaDirective(
87
+ $aria: ng.AriaService,
88
+ ): (scope: ng.Scope, elem: HTMLElement, attr: ng.Attributes) => void;
62
89
  export namespace ngCheckedAriaDirective {
63
90
  let $inject_4: string[];
64
91
  export { $inject_4 as $inject };
65
92
  }
66
- export function ngValueAriaDirective($aria: any): any;
93
+ /**
94
+ * @param {ng.AriaService} $aria
95
+ */
96
+ export function ngValueAriaDirective(
97
+ $aria: ng.AriaService,
98
+ ): (scope: ng.Scope, elem: HTMLElement, attr: ng.Attributes) => void;
67
99
  export namespace ngValueAriaDirective {
68
100
  let $inject_5: string[];
69
101
  export { $inject_5 as $inject };
70
102
  }
71
- export function ngHideAriaDirective($aria: any): any;
103
+ /**
104
+ * @param {ng.AriaService} $aria
105
+ */
106
+ export function ngHideAriaDirective(
107
+ $aria: ng.AriaService,
108
+ ): (scope: ng.Scope, elem: HTMLElement, attr: ng.Attributes) => void;
72
109
  export namespace ngHideAriaDirective {
73
110
  let $inject_6: string[];
74
111
  export { $inject_6 as $inject };
75
112
  }
76
- export function ngReadonlyAriaDirective($aria: any): any;
113
+ /**
114
+ * @param {ng.AriaService} $aria
115
+ */
116
+ export function ngReadonlyAriaDirective(
117
+ $aria: ng.AriaService,
118
+ ): (scope: ng.Scope, elem: HTMLElement, attr: ng.Attributes) => void;
77
119
  export namespace ngReadonlyAriaDirective {
78
120
  let $inject_7: string[];
79
121
  export { $inject_7 as $inject };
80
122
  }
81
- export function ngModelAriaDirective($aria: any): {
82
- restrict: string;
83
- require: string;
84
- priority: number;
85
- compile(
86
- _: any,
87
- attr: any,
88
- ): {
89
- post(_: any, elem: any, attrPost: any, ngModel: any): void;
90
- };
91
- };
123
+ /**
124
+ * @param {ng.AriaService} $aria
125
+ * @returns {ng.Directive}
126
+ */
127
+ export function ngModelAriaDirective($aria: ng.AriaService): ng.Directive;
92
128
  export namespace ngModelAriaDirective {
93
129
  let $inject_8: string[];
94
130
  export { $inject_8 as $inject };
95
131
  }
132
+ /**
133
+ * @param {ng.AriaService} $aria
134
+ * @returns {import("../../interface.js").DirectiveLinkFn<any>}
135
+ */
96
136
  export function ngDblclickAriaDirective(
97
- $aria: any,
98
- ): (scope: any, elem: any, attr: any) => void;
137
+ $aria: ng.AriaService,
138
+ ): import("../../interface.js").DirectiveLinkFn<any>;
99
139
  export namespace ngDblclickAriaDirective {
100
140
  let $inject_9: string[];
101
141
  export { $inject_9 as $inject };
@@ -0,0 +1,9 @@
1
+ export interface AriaService {
2
+ config(key: string | number): any;
3
+ _watchExpr(
4
+ attrName: string | number,
5
+ ariaAttr: string,
6
+ nativeAriaNodeNamesParam: string[],
7
+ negate: boolean,
8
+ ): (scope: ng.Scope, elem: HTMLElement, attr: ng.Attributes) => void;
9
+ }
@@ -1,3 +1,34 @@
1
+ /**
2
+ * Returns all items from `tokens1` that are not present in `tokens2`.
3
+ *
4
+ * @param {string[]} tokens1
5
+ * @param {string[]} tokens2
6
+ * @returns {string[]}
7
+ */
8
+ export function arrayDifference(tokens1: string[], tokens2: string[]): string[];
9
+ /**
10
+ * Split a class string into tokens.
11
+ *
12
+ * - Trims leading/trailing whitespace
13
+ * - Collapses any whitespace runs (space/tab/newline) into token boundaries
14
+ *
15
+ * @param {string} classString
16
+ * @return {string[]}
17
+ */
18
+ export function split(classString: string): string[];
19
+ /**
20
+ * Convert an `ngClass` expression value into a space-delimited class string.
21
+ *
22
+ * Supports:
23
+ * - string: returned as-is
24
+ * - array: flattened and joined with spaces (falsy items are ignored)
25
+ * - object: keys with truthy values are included
26
+ * - other primitives: stringified
27
+ *
28
+ * @param {unknown} classValue
29
+ * @returns {string}
30
+ */
31
+ export function toClassString(classValue: unknown): string;
1
32
  export const ngClassDirective: import("../../interface.ts").DirectiveFactory;
2
33
  export const ngClassOddDirective: import("../../interface.ts").DirectiveFactory;
3
34
  export const ngClassEvenDirective: import("../../interface.ts").DirectiveFactory;
@@ -1,4 +1,3 @@
1
- export function setupValidity(instance: any): void;
2
1
  /**
3
2
  * @param {FormController|ng.NgModelController} ctrl
4
3
  * @param {string} className
@@ -16,7 +15,7 @@ export function cachedToggleClass(
16
15
  * $getControls: () => any[],
17
16
  * _renameControl: Function,
18
17
  * $removeControl: Function,
19
- * $setValidity: Function | ((key: any, isValid: boolean, control: any) => any),
18
+ * $setValidity: Function | ((key: any, isValid: boolean | undefined | null, control: any) => any),
20
19
  * $setDirty: Function,
21
20
  * $setPristine: Function,
22
21
  * $setSubmitted: Function,
@@ -29,7 +28,9 @@ export const nullFormCtrl: {
29
28
  $getControls: () => any[];
30
29
  _renameControl: Function;
31
30
  $removeControl: Function;
32
- $setValidity: Function | ((key: any, isValid: boolean, control: any) => any);
31
+ $setValidity:
32
+ | Function
33
+ | ((key: any, isValid: boolean | undefined | null, control: any) => any);
33
34
  $setDirty: Function;
34
35
  $setPristine: Function;
35
36
  $setSubmitted: Function;
@@ -99,7 +100,10 @@ export class FormController {
99
100
  );
100
101
  /** @type {boolean} */
101
102
  _isAnimated: boolean;
102
- _controls: any[];
103
+ /**
104
+ * @type {FormController[]}
105
+ */
106
+ _controls: FormController[];
103
107
  $name: any;
104
108
  /**
105
109
  * @property {boolean} $dirty True if user has already interacted with the form.
@@ -109,18 +113,27 @@ export class FormController {
109
113
  * @propertys {boolean} $pristine - True if user has not interacted with the form yet.s
110
114
  */
111
115
  $pristine: boolean;
112
- $valid: boolean;
113
- $invalid: boolean;
116
+ /** @type {boolean | undefined} */
117
+ $valid: boolean | undefined;
118
+ /** @type {boolean | undefined} */
119
+ $invalid: boolean | undefined;
114
120
  $submitted: boolean;
115
121
  /** @type {FormController|Object} */
116
122
  _parentForm: FormController | any;
117
123
  _element: HTMLFormElement;
118
- _animate: import("../../animations/interface.ts").AnimateService;
119
- $error: {};
120
- _success: {};
121
- $pending: any;
122
- _classCache: {};
123
- $target: {};
124
+ _animate: import("../../docs.ts").AnimateService;
125
+ /** @type {Record<string, any>} */
126
+ $error: Record<string, any>;
127
+ /** @type {Record<string, any>} */
128
+ _success: Record<string, any>;
129
+ /**
130
+ * @type {Record<string, any>| undefined}
131
+ */
132
+ $pending: Record<string, any> | undefined;
133
+ /** @type {Record<string, any>} */
134
+ _classCache: Record<string, any>;
135
+ /** @type {Record<string, any>} */
136
+ $target: Record<string, any>;
124
137
  /**
125
138
  * Rollback all form controls pending updates to the `$modelValue`.
126
139
  *
@@ -151,8 +164,9 @@ export class FormController {
151
164
  *
152
165
  * For example, if an input control is added that is already `$dirty` and has `$error` properties,
153
166
  * calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form.
167
+ * @param {FormController} control
154
168
  */
155
- $addControl(control: any): void;
169
+ $addControl(control: FormController): void;
156
170
  /**
157
171
  * This method returns a **shallow copy** of the controls that are currently part of this form.
158
172
  * The controls can be instances of {@link form.FormController `FormController`}
@@ -170,7 +184,11 @@ export class FormController {
170
184
  * @returns {ReadonlyArray<FormController>}
171
185
  */
172
186
  $getControls(): ReadonlyArray<FormController>;
173
- _renameControl(control: any, newName: any): void;
187
+ /**
188
+ * @param {FormController} control
189
+ * @param {string | number} newName
190
+ */
191
+ _renameControl(control: FormController, newName: string | number): void;
174
192
  /**
175
193
  * Deregister a control from the form.
176
194
  *
@@ -219,8 +237,26 @@ export class FormController {
219
237
  */
220
238
  $setSubmitted(): void;
221
239
  _setSubmitted(): void;
222
- set(object: any, property: any, controller: any): void;
223
- unset(object: any, property: any, controller: any): void;
240
+ /**
241
+ * @param {Record<string, any>} object
242
+ * @param {string} property
243
+ * @param {FormController | import("../model/model.js").NgModelController} controller
244
+ */
245
+ set(
246
+ object: Record<string, any>,
247
+ property: string,
248
+ controller: FormController | import("../model/model.js").NgModelController,
249
+ ): void;
250
+ /**
251
+ * @param {Record<string, any>} object
252
+ * @param {string} property
253
+ * @param {FormController | import("../model/model.js").NgModelController} controller
254
+ */
255
+ unset(
256
+ object: Record<string, any>,
257
+ property: string,
258
+ controller: FormController | import("../model/model.js").NgModelController,
259
+ ): void;
224
260
  /**
225
261
  * Change the validity state of the form, and notify the parent form (if any).
226
262
  *
@@ -234,7 +270,7 @@ export class FormController {
234
270
  * `validationErrorKey` should be in camelCase and will get converted into dash-case for
235
271
  * class name. Example: `myError` will result in `ng-valid-my-error` and
236
272
  * `ng-invalid-my-error` classes and can be bound to as `{{ someForm.$error.myError }}`.
237
- * @param {boolean} state Whether the current state is valid (true), invalid (false), pending
273
+ * @param {boolean | null | undefined} state Whether the current state is valid (true), invalid (false), pending
238
274
  * (undefined), or skipped (null). Pending is used for unfulfilled `$asyncValidators`.
239
275
  * Skipped is used by AngularTS when validators do not run because of parse errors and when
240
276
  * `$asyncValidators` do not run because any of the `$validators` failed.
@@ -243,7 +279,7 @@ export class FormController {
243
279
  */
244
280
  $setValidity(
245
281
  validationErrorKey: string,
246
- state: boolean,
282
+ state: boolean | null | undefined,
247
283
  controller: import("../model/model.js").NgModelController | FormController,
248
284
  ): void;
249
285
  }