@angular-wave/angular.ts 0.0.40 → 0.0.42

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 (79) hide show
  1. package/README.md +28 -0
  2. package/dist/angular-ts.esm.js +2 -2
  3. package/dist/angular-ts.umd.js +2 -2
  4. package/package.json +1 -1
  5. package/src/animations/animate-queue.js +7 -4
  6. package/src/core/compile/compile.js +5 -3
  7. package/src/core/compile/compile.md +2 -5
  8. package/src/core/compile/compile.spec.js +2 -43
  9. package/src/core/exception-handler.js +6 -6
  10. package/src/core/interpolate/interpolate.js +1 -1
  11. package/src/core/location/location.spec.js +0 -4
  12. package/src/core/q/q.js +1 -1
  13. package/src/core/scope/scope.js +1 -1
  14. package/src/core/task-tracker-factory.js +2 -2
  15. package/src/core/timeout/timeout.js +1 -1
  16. package/src/core/url-utils/url-utils.js +0 -2
  17. package/src/directive/bind/bind.js +2 -2
  18. package/src/directive/change/change.js +1 -1
  19. package/src/directive/cloak/cloak.js +1 -1
  20. package/src/directive/events/events.js +1 -1
  21. package/src/directive/form/form.js +2 -2
  22. package/src/directive/include/include.js +5 -7
  23. package/src/directive/init/init.js +1 -1
  24. package/src/directive/list/list.js +1 -1
  25. package/src/directive/model/model.js +1 -1
  26. package/src/directive/model-options/model-options.js +56 -421
  27. package/src/directive/model-options/model-options.md +407 -0
  28. package/src/directive/model-options/model-options.spec.js +1 -1
  29. package/src/directive/non-bindable/non-bindable.js +1 -2
  30. package/src/directive/options/options.js +3 -3
  31. package/src/directive/style/style.js +1 -1
  32. package/src/directive/switch/switch.js +2 -2
  33. package/src/directive/transclude/transclude.js +2 -2
  34. package/src/index.js +0 -461
  35. package/src/loader.js +1 -1
  36. package/src/public.js +1 -1
  37. package/src/router/template-factory.js +2 -2
  38. package/src/router/view-scroll.js +1 -1
  39. package/src/services/browser.js +1 -1
  40. package/src/services/document.js +2 -2
  41. package/src/services/http/http.js +11 -7
  42. package/src/services/log.js +1 -1
  43. package/src/services/template-request.js +1 -1
  44. package/src/shared/jqlite/jqlite.js +380 -351
  45. package/src/shared/jqlite/jqlite.spec.js +73 -82
  46. package/src/shared/utils.js +1 -1
  47. package/src/types.js +451 -0
  48. package/tsconfig.json +1 -1
  49. package/types/animations/shared.d.ts +7 -2
  50. package/types/core/compile/compile.d.ts +2 -1
  51. package/types/core/exception-handler.d.ts +5 -7
  52. package/types/core/interpolate/interpolate.d.ts +1 -1
  53. package/types/core/q/q.d.ts +1 -1
  54. package/types/core/task-tracker-factory.d.ts +5 -5
  55. package/types/core/timeout/timeout.d.ts +2 -2
  56. package/types/directive/bind/bind.d.ts +4 -4
  57. package/types/directive/change/change.d.ts +2 -2
  58. package/types/directive/cloak/cloak.d.ts +2 -2
  59. package/types/directive/include/include.d.ts +2 -2
  60. package/types/directive/init/init.d.ts +2 -2
  61. package/types/directive/list/list.d.ts +2 -2
  62. package/types/directive/model/model.d.ts +13 -7
  63. package/types/directive/model-options/model-options.d.ts +49 -0
  64. package/types/directive/non-bindable/non-bindable.d.ts +2 -3
  65. package/types/directive/style/style.d.ts +2 -2
  66. package/types/directive/switch/switch.d.ts +4 -4
  67. package/types/index.d.ts +1 -702
  68. package/types/public.d.ts +2 -2
  69. package/types/router/template-factory.d.ts +4 -4
  70. package/types/services/browser.d.ts +3 -3
  71. package/types/services/document.d.ts +6 -7
  72. package/types/services/log.d.ts +2 -2
  73. package/types/services/template-request.d.ts +1 -1
  74. package/types/shared/jqlite/jqlite.d.ts +91 -21
  75. package/types/shared/utils.d.ts +2 -2
  76. package/types/types.d.ts +438 -0
  77. package/types-back/index.d.ts +1 -83
  78. package/types-back/jqlite.d.ts +1 -121
  79. package/types-back/global.d.ts +0 -11
@@ -1,4 +1,11 @@
1
- import { JQLite, dealoc, kebabToCamel } from "./jqlite";
1
+ import {
2
+ JQLite,
3
+ dealoc,
4
+ kebabToCamel,
5
+ cleanElementData,
6
+ getOrSetCacheData,
7
+ removeElementData,
8
+ } from "./jqlite";
2
9
  import { angularInit } from "../../loader";
3
10
  import { createInjector } from "../../injector";
4
11
  import { publishExternalAPI } from "../../public";
@@ -474,61 +481,63 @@ describe("jqLite", () => {
474
481
  expect(elm.data("key2")).toBe("value2");
475
482
  });
476
483
 
477
- it("should remove user data on cleanData()", () => {
478
- const selected = JQLite([a, b, c]);
484
+ describe("cleanElementData helper", () => {
485
+ it("should remove user data on cleanElementData()", () => {
486
+ const selected = JQLite([a, b, c]);
479
487
 
480
- selected.data("prop", "value");
481
- JQLite(b).data("prop", "new value");
488
+ selected.data("prop", "value");
489
+ JQLite(b).data("prop", "new value");
482
490
 
483
- JQLite.cleanData(selected);
491
+ cleanElementData(selected);
484
492
 
485
- expect(JQLite(a).data("prop")).toBeUndefined();
486
- expect(JQLite(b).data("prop")).toBeUndefined();
487
- expect(JQLite(c).data("prop")).toBeUndefined();
488
- });
489
-
490
- it("should remove event handlers on cleanData()", () => {
491
- const selected = JQLite([a, b, c]);
492
-
493
- let log = "";
494
- const elm = JQLite(b);
495
- elm.on("click", () => {
496
- log += "click;";
493
+ expect(JQLite(a).data("prop")).toBeUndefined();
494
+ expect(JQLite(b).data("prop")).toBeUndefined();
495
+ expect(JQLite(c).data("prop")).toBeUndefined();
497
496
  });
498
- JQLite.cleanData(selected);
499
497
 
500
- browserTrigger(b, "click");
501
- expect(log).toBe("");
502
- });
498
+ it("should remove event handlers on cleanElementData()", () => {
499
+ const selected = JQLite([a, b, c]);
503
500
 
504
- it("should remove user data & event handlers on cleanData()", () => {
505
- const selected = JQLite([a, b, c]);
501
+ let log = "";
502
+ const elm = JQLite(b);
503
+ elm.on("click", () => {
504
+ log += "click;";
505
+ });
506
+ cleanElementData(selected);
506
507
 
507
- let log = "";
508
- const elm = JQLite(b);
509
- elm.on("click", () => {
510
- log += "click;";
508
+ browserTrigger(b, "click");
509
+ expect(log).toBe("");
511
510
  });
512
511
 
513
- selected.data("prop", "value");
514
- JQLite(a).data("prop", "new value");
512
+ it("should remove user data & event handlers on cleanElementData()", () => {
513
+ const selected = JQLite([a, b, c]);
515
514
 
516
- JQLite.cleanData(selected);
515
+ let log = "";
516
+ const elm = JQLite(b);
517
+ elm.on("click", () => {
518
+ log += "click;";
519
+ });
517
520
 
518
- browserTrigger(b, "click");
519
- expect(log).toBe("");
521
+ selected.data("prop", "value");
522
+ JQLite(a).data("prop", "new value");
520
523
 
521
- expect(JQLite(a).data("prop")).toBeUndefined();
522
- expect(JQLite(b).data("prop")).toBeUndefined();
523
- expect(JQLite(c).data("prop")).toBeUndefined();
524
- });
524
+ cleanElementData(selected);
525
525
 
526
- it("should not break on cleanData(), if element has no data", () => {
527
- const selected = JQLite([a, b, c]);
528
- spyOn(CACHE, "get").and.returnValue(undefined);
529
- expect(() => {
530
- JQLite.cleanData(selected);
531
- }).not.toThrow();
526
+ browserTrigger(b, "click");
527
+ expect(log).toBe("");
528
+
529
+ expect(JQLite(a).data("prop")).toBeUndefined();
530
+ expect(JQLite(b).data("prop")).toBeUndefined();
531
+ expect(JQLite(c).data("prop")).toBeUndefined();
532
+ });
533
+
534
+ it("should not break on cleanElementData(), if element has no data", () => {
535
+ const selected = JQLite([a, b, c]);
536
+ spyOn(CACHE, "get").and.returnValue(undefined);
537
+ expect(() => {
538
+ cleanElementData(selected);
539
+ }).not.toThrow();
540
+ });
532
541
  });
533
542
 
534
543
  it("should add and remove data on SVGs", () => {
@@ -553,32 +562,34 @@ describe("jqLite", () => {
553
562
  expect(CACHE.size).toEqual(initial);
554
563
  });
555
564
 
556
- it("should provide the non-wrapped data calls", () => {
557
- const node = document.createElement("div");
558
- document.body.appendChild(node);
565
+ describe("removeElementData/getOrSetCacheData helpers", () => {
566
+ it("should provide the non-wrapped data calls", () => {
567
+ const node = document.createElement("div");
568
+ document.body.appendChild(node);
559
569
 
560
- expect(CACHE.has(node[EXPANDO])).toBe(false);
561
- expect(JQLite.data(node, "foo")).toBeUndefined();
562
- expect(CACHE.has(node[EXPANDO])).toBe(false);
570
+ expect(CACHE.has(node[EXPANDO])).toBe(false);
571
+ expect(getOrSetCacheData(node, "foo")).toBeUndefined();
572
+ expect(CACHE.has(node[EXPANDO])).toBe(false);
563
573
 
564
- JQLite.data(node, "foo", "bar");
574
+ getOrSetCacheData(node, "foo", "bar");
565
575
 
566
- expect(CACHE.has(node[EXPANDO])).toBe(true);
567
- expect(JQLite.data(node, "foo")).toBe("bar");
568
- expect(JQLite(node).data("foo")).toBe("bar");
576
+ expect(CACHE.has(node[EXPANDO])).toBe(true);
577
+ expect(getOrSetCacheData(node, "foo")).toBe("bar");
578
+ expect(JQLite(node).data("foo")).toBe("bar");
569
579
 
570
- expect(JQLite.data(node)).toBe(JQLite(node).data());
580
+ expect(getOrSetCacheData(node)).toBe(JQLite(node).data());
571
581
 
572
- JQLite.removeData(node, "foo");
573
- expect(JQLite.data(node, "foo")).toBeUndefined();
582
+ removeElementData(node, "foo");
583
+ expect(getOrSetCacheData(node, "foo")).toBeUndefined();
574
584
 
575
- JQLite.data(node, "bar", "baz");
576
- JQLite.removeData(node);
577
- JQLite.removeData(node);
578
- expect(JQLite.data(node, "bar")).toBeUndefined();
585
+ getOrSetCacheData(node, "bar", "baz");
586
+ removeElementData(node);
587
+ removeElementData(node);
588
+ expect(getOrSetCacheData(node, "bar")).toBeUndefined();
579
589
 
580
- JQLite(node).remove();
581
- expect(CACHE.has(node[EXPANDO])).toBe(false);
590
+ JQLite(node).remove();
591
+ expect(CACHE.has(node[EXPANDO])).toBe(false);
592
+ });
582
593
  });
583
594
 
584
595
  it("should emit $destroy event if element removed via remove()", function () {
@@ -1274,26 +1285,6 @@ describe("jqLite", () => {
1274
1285
  expect(log).toEqual("childEnter;");
1275
1286
  });
1276
1287
  });
1277
-
1278
- it("should throw an error if eventData or a selector is passed", () => {
1279
- const elm = JQLite(a);
1280
- const anObj = {};
1281
- const aString = "";
1282
- const aValue = 45;
1283
- const callback = () => {};
1284
-
1285
- expect(() => {
1286
- elm.on("click", anObj, callback);
1287
- }).toThrow();
1288
-
1289
- expect(() => {
1290
- elm.on("click", null, aString, callback);
1291
- }).toThrow();
1292
-
1293
- expect(() => {
1294
- elm.on("click", aValue, callback);
1295
- }).toThrow();
1296
- });
1297
1288
  });
1298
1289
 
1299
1290
  describe("off", () => {
@@ -1201,7 +1201,7 @@ export const minErrConfig = {};
1201
1201
  * should all be static strings, not variables or general expressions.
1202
1202
  *
1203
1203
  * @param {string} module The namespace to use for the new minErr instance.
1204
- * @returns {function(string, string, ...*): Error} minErr instance
1204
+ * @returns {function(string, ...*): Error} minErr instance
1205
1205
  */
1206
1206
  export function minErr(module) {
1207
1207
  const url = 'https://errors.angularjs.org/"NG_VERSION_FULL"/';
package/src/types.js ADDED
@@ -0,0 +1,451 @@
1
+ /**
2
+ * @typedef {Object} BootstrapConfig
3
+ * @description Configuration option for AngularTS bootstrap process.
4
+ * @property {boolean} debugInfoEnabled - Indicates whether debug information should be enabled. Setting this to `false` can improve performance but will disable some debugging features.
5
+ * @property {boolean} [strictDi] - Disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code. Defaults to `false`.
6
+ */
7
+
8
+ /**
9
+ * @typedef {Function|Array<string|Function>} Injectable
10
+ * @description Represents a type that can be injected, either as a function or an array of strings/functions.
11
+ * @template T
12
+ */
13
+
14
+ /**
15
+ * @typedef {Object} ComponentOptions
16
+ * @description Component definition object (a simplified directive definition object)
17
+ * @property {string |Injectable<ControllerConstructor>> | undefined} [controller]
18
+ * Controller constructor function or name of a registered controller.
19
+ * Use array form for dependencies (necessary with strictDi).
20
+ * @property {string | undefined} [controllerAs]
21
+ * Identifier name for the controller published to its scope (default: '$ctrl').
22
+ * @property {string |Injectable<(...args: any[]) => string> | undefined} [template]
23
+ * HTML template string or function returning an HTML template.
24
+ * If a function, injects $element and $attrs.
25
+ * Use array form for dependencies (necessary with strictDi).
26
+ * @property {string |Injectable<(...args: any[]) => string> | undefined} [templateUrl]
27
+ * Path or function returning a path to an HTML template.
28
+ * If a function, injects $element and $attrs.
29
+ * Use array form for dependencies (necessary with strictDi).
30
+ * @property {{ [boundProperty: string]: string } | undefined} [bindings]
31
+ * DOM attribute bindings to component properties.
32
+ * Component properties are bound to the controller, not the scope.
33
+ * @property {boolean | { [slot: string]: string } | undefined} [transclude]
34
+ * Whether transclusion is enabled. Disabled by default.
35
+ * @property {{ [controller: string]: string } | undefined} [require]
36
+ * Requires controllers of other directives, binding them to this component's controller.
37
+ * Keys specify property names under which required controllers (object values) are bound.
38
+ * Required controllers available before $onInit method execution.
39
+ */
40
+
41
+ /**
42
+ * @typedef {Function} ControllerConstructor
43
+ * @description Controller constructor type for AngularJS. Note: Instead of classes, plain functions are often used as controller constructors, especially in examples.
44
+ * @param {...any} args Arguments passed to the controller constructor.
45
+ * @returns {void | Controller} Returns nothing or an instance of IController.
46
+ */
47
+
48
+ /**
49
+ * @typedef {Object} OnChangesObject
50
+ * @description Object representing changes in one-way bound properties.
51
+ * Keys are the names of the bound properties that have changed, and values are instances of IChangesObject.
52
+ * @property {ChangesObject<any>} property - Represents a changed property.
53
+ */
54
+
55
+ /**
56
+ * @typedef {Object} ChangesObject
57
+ * @description Object representing changes in a property.
58
+ * @property {*} currentValue - Current value of the property.
59
+ * @property {*} previousValue - Previous value of the property.
60
+ * @property {function(): boolean} isFirstChange - Function to check if it's the first change of the property.
61
+ */
62
+
63
+ /**
64
+ * @typedef {Object} Controller
65
+ * @description Interface representing the lifecycle hooks for AngularJS directive controllers.
66
+ * @see {@link https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks}
67
+ * @see {@link https://docs.angularjs.org/guide/component}
68
+ *
69
+ * @property {function(): void} [$onInit]
70
+ * Called on each controller after all the controllers on an element have been constructed and had their bindings
71
+ * initialized (and before the pre & post linking functions for the directives on this element). This is a good
72
+ * place to put initialization code for your controller.
73
+ *
74
+ * @property {function(): void} [$doCheck]
75
+ * Called on each turn of the digest cycle. Provides an opportunity to detect and act on changes.
76
+ * Any actions that you wish to take in response to the changes that you detect must be invoked from this hook;
77
+ * implementing this has no effect on when `$onChanges` is called. For example, this hook could be useful if you wish
78
+ * to perform a deep equality check, or to check a `Date` object, changes to which would not be detected by Angular's
79
+ * change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments; if detecting changes,
80
+ * you must store the previous value(s) for comparison to the current values.
81
+ *
82
+ * @property {function(OnChangesObject): void} [$onChanges]
83
+ * Called whenever one-way bindings are updated. The onChangesObj is a hash whose keys are the names of the bound
84
+ * properties that have changed, and the values are an {@link IChangesObject} object of the form
85
+ * { currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a component such as
86
+ * cloning the bound value to prevent accidental mutation of the outer value.
87
+ *
88
+ * @property {function(): void} [$onDestroy]
89
+ * Called on a controller when its containing scope is destroyed. Use this hook for releasing external resources,
90
+ * watches and event handlers.
91
+ *
92
+ * @property {function(): void} [$postLink]
93
+ * Called after this controller's element and its children have been linked. Similar to the post-link function this
94
+ * hook can be used to set up DOM event handlers and do direct DOM manipulation. Note that child elements that contain
95
+ * templateUrl directives will not have been compiled and linked since they are waiting for their template to load
96
+ * asynchronously and their own compilation and linking has been suspended until that occurs. This hook can be considered
97
+ * analogous to the ngAfterViewInit and ngAfterContentInit hooks in Angular 2. Since the compilation process is rather
98
+ * different in Angular 1 there is no direct mapping and care should be taken when upgrading.
99
+ *
100
+ * @property {*} [s: string]
101
+ * IController implementations frequently do not implement any of its methods.
102
+ * A string indexer indicates to TypeScript not to issue a weak type error in this case.
103
+ */
104
+
105
+ /**
106
+ * @typedef {Object.<string, any>} Attributes
107
+ *
108
+ * @property {(name: string) => string} $normalize
109
+ * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-) to its normalized, camelCase form.
110
+ * Also there is special case for Moz prefix starting with upper case letter.
111
+ *
112
+ * @property {(newClasses: string, oldClasses: string) => void} $updateClass
113
+ * Adds and removes the appropriate CSS class values to the element based on the difference between
114
+ * the new and old CSS class values (specified as newClasses and oldClasses).
115
+ *
116
+ * @property {(key: string, value: any) => void} $set
117
+ * Set DOM element attribute value.
118
+ *
119
+ * @property {<T>(name: string, fn: (value?: T) => any) => Function} $observe
120
+ * Observes an interpolated attribute.
121
+ * The observer function will be invoked once during the next $digest
122
+ * following compilation. The observer is then invoked whenever the
123
+ * interpolated value changes.
124
+ *
125
+ * @property {Object.<string, string>} $attr
126
+ * A map of DOM element attribute names to the normalized name. This is needed
127
+ * to do reverse lookup from normalized name back to actual name.
128
+ * @see http://docs.angularjs.org/api/ng/type/$compile.directive.Attributes
129
+ */
130
+
131
+ /**
132
+ * @typedef {import('./core/scope/scope').Scope} TScope
133
+ */
134
+
135
+ /**
136
+ * @typedef {import('./shared/jqlite/jqlite').JQLite} TElement
137
+ */
138
+
139
+ /**
140
+ * @typedef {Attributes} TAttributes
141
+ */
142
+
143
+ /**
144
+ * @typedef {DirectiveController} TController
145
+ */
146
+
147
+ /**
148
+ * @typedef {Controller | Controller[] | { [key: string]: Controller }} DirectiveController
149
+ * @description Represents a directive controller, which can be:
150
+ * - A single instance of {@link Controller}
151
+ * - An array of {@link Controller}
152
+ * - An object where keys are string identifiers and values are {@link Controller}
153
+ */
154
+
155
+ /**
156
+ * @template [S=import('./core/scope/scope').Scope]
157
+ * @template {TScope} S - The type of the directive's scope.
158
+ *
159
+ * @template [T=import('./shared/jqlite/jqlite').JQLite]
160
+ * @template {TElement} T - The type of the directive's element.
161
+ *
162
+ * @template [A=Attributes]
163
+ * @template {TAttributes} A - The type of the directive's attributes.
164
+ *
165
+ * @template [C=Controller]
166
+ * @template {TController} C - The type of the directive's controller.
167
+ */
168
+
169
+ /**
170
+ * Compile function for an AngularJS directive.
171
+ *
172
+ * @callback DirectiveCompileFn
173
+ * @param {TElement} templateElement - The template element.
174
+ * @param {TAttributes} templateAttributes - The template attributes.
175
+ * @param {TranscludeFunction} transclude - @deprecated The transclude function. Note: The transclude function that is passed to the compile function is deprecated,
176
+ * as it e.g. does not know about the right outer scope. Please use the transclude function
177
+ * that is passed to the link function instead.
178
+ * @returns {void | DirectiveLinkFn | DirectivePrePost} Returns void, DirectiveLinkFn, or DirectivePrePost.
179
+ */
180
+
181
+ /**
182
+ * Link function for an AngularJS directive.
183
+ *
184
+ * @callback DirectiveLinkFn
185
+ * @param {TScope} scope
186
+ * @param {TElement} instanceElement
187
+ * @param {TAttributes} instanceAttributes
188
+ * @param {TController} [controller]
189
+ * @param {TranscludeFunction} [transclude]
190
+ * @returns {void}
191
+ */
192
+
193
+ /**
194
+ * @callback CloneAttachFunction
195
+ * @param {JQLite} [clonedElement]
196
+ * @param {Scope} [scope] // Let's hint but not force cloneAttachFn's signature
197
+ * @returns {any}
198
+ */
199
+
200
+ /**
201
+ * This corresponds to $transclude passed to controllers and to the transclude function passed to link functions.
202
+ * https://docs.angularjs.org/api/ng/service/$compile#-controller-
203
+ * http://teropa.info/blog/2015/06/09/transclusion.html
204
+ *
205
+ * @typedef {Object} TranscludeFunction
206
+ * @property {function(TScope, CloneAttachFunction, JQLite=, string=): import('./shared/jqlite/jqlite').JQLite} transcludeWithScope
207
+ * @property {function(CloneAttachFunction=, JQLite=, string=): import('./shared/jqlite/jqlite').JQLite} transcludeWithoutScope
208
+ * @property {function(string): boolean} isSlotFilled - Returns true if the specified slot contains content (i.e., one or more DOM nodes)
209
+ */
210
+
211
+ /**
212
+ * @typedef {function(TScope, CloneAttachFunction, JQLite=, string=): import('./shared/jqlite/jqlite').JQLite} transcludeWithScope
213
+ */
214
+
215
+ /**
216
+ * @typedef {function(CloneAttachFunction=, JQLite=, string=): import('./shared/jqlite/jqlite').JQLite} transcludeWithoutScope
217
+ */
218
+
219
+ /**
220
+ * Represents the pre and post linking functions of a directive.
221
+ *
222
+ *
223
+ * @typedef {Object} DirectivePrePost
224
+ * @property {DirectiveLinkFn | undefined} [pre]
225
+ * The pre-linking function of the directive.
226
+ * @property {DirectiveLinkFn | undefined} [post]
227
+ * The post-linking function of the directive.
228
+ */
229
+
230
+ /**
231
+ * Directive definition object.
232
+ *
233
+ *
234
+ * @typedef {Object} Directive
235
+ * @property {DirectiveCompileFn | undefined} [compile]
236
+ * Compile function for the directive.
237
+ * @property {string | Injectable<ControllerConstructor> | undefined} [controller]
238
+ * Controller constructor or name.
239
+ * @property {string | undefined} [controllerAs]
240
+ * Controller alias.
241
+ * @property {boolean | { [boundProperty: string]: string } | undefined} [bindToController]
242
+ * Bindings to controller.
243
+ * @property {DirectiveLinkFn | DirectivePrePost | undefined} [link]
244
+ * Link function.
245
+ * @property {boolean | undefined} [multiElement]
246
+ * Multi-element directive flag.
247
+ * @property {number | undefined} [priority]
248
+ * Skip all directives on element
249
+ * @property {boolean | undefined} [terminal]
250
+ * Directive priority.
251
+ * @property {boolean | undefined} [replace]
252
+ * Deprecated: Replace flag.
253
+ * @property {string | string[] | { [controller: string]: string } | undefined} [require]
254
+ * Required controllers.
255
+ * @property {string | undefined} [restrict]
256
+ * Restriction mode.
257
+ * @property {boolean | { [boundProperty: string]: string } | undefined} [scope]
258
+ * Scope options.
259
+ * @property {string | ((tElement: TElement, tAttrs: TAttributes) => string) | undefined} [template]
260
+ * HTML template.
261
+ * @property {string | undefined} [templateNamespace]
262
+ * Template namespace.
263
+ * @property {string | ((tElement: TElement, tAttrs: TAttributes) => string) | undefined} [templateUrl]
264
+ * HTML template URL.
265
+ * @property {boolean | "element" | { [slot: string]: string } | undefined} [transclude]
266
+ * Transclusion options.
267
+ */
268
+
269
+ /**
270
+ * Factory function for creating directives.
271
+ *
272
+ *
273
+ * @typedef {(...args: any[]) => Directive | DirectiveLinkFn} DirectiveFactory
274
+ */
275
+
276
+ /**
277
+ * @typedef {Function} FilterFunction
278
+ * @property {boolean|undefined} [$stateful] 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.** See https://docs.angularjs.org/guide/filter#stateful-filters
279
+ */
280
+
281
+ /**
282
+ * @typedef {Function} FilterFactory
283
+ * @returns {FilterFunction}
284
+ */
285
+
286
+ /**
287
+ * Interface for a service provider class.
288
+ * @typedef {Object} ServiceProviderClass
289
+ * @property {Function} constructor - The constructor for the service provider.
290
+ * @param {...any} args - The arguments for the constructor.
291
+ * @returns {ServiceProvider}
292
+ */
293
+
294
+ /**
295
+ * Interface for a service provider factory function.
296
+ * @typedef {Function} ServiceProviderFactory
297
+ * @param {...any} args - The arguments for the factory function.
298
+ * @returns {ServiceProvider}
299
+ */
300
+
301
+ /**
302
+ * Interface for a service provider.
303
+ * @typedef {Object} ServiceProvider
304
+ * @property {*} $get - The $get property that represents a service instance or a factory function.
305
+ */
306
+
307
+ /**
308
+ *
309
+ * @typedef {Object} Module
310
+ * @description AngularJS module interface for registering components, services, providers, etc.
311
+ * @property {function(string, ComponentOptions): Module} component
312
+ * Use this method to register a component.
313
+ * @property {function({ [componentName: string]: ComponentOptions }): Module} component
314
+ * Use this method to register multiple components.
315
+ * @property {function(Function): Module} config
316
+ * Use this method to register work which needs to be performed on module loading.
317
+ * @property {function(any[]): Module} config
318
+ * Use this method to register work which needs to be performed on module loading.
319
+ * @property {function<T>(string, T): Module} constant
320
+ * Register a constant service with the $injector.
321
+ * @property {function(Object): Module} constant
322
+ * Register multiple constant services.
323
+ * @property {function(string, Injectable<ControllerConstructor>): Module} controller
324
+ * Register a controller with the $controller service.
325
+ * @property {function({ [name: string]: Injectable<ControllerConstructor>> }): Module} controller
326
+ * Register multiple controllers.
327
+ * @property {function(string, Injectable<DirectiveFactory>): Module} directive
328
+ * Register a directive with the compiler.
329
+ * @property {function(Object.<string, Injectable<DirectiveFactory>>): Module} directive
330
+ * Register multiple directives.
331
+ * @property {function(string, Injectable<Function>): Module} factory
332
+ * Register a service factory with the $injector.
333
+ * @property {function(Object.<string, Injectable<Function>>): Module} factory
334
+ * Register multiple service factories.
335
+ * @property {function(string, Injectable<FilterFactory>): Module} filter
336
+ * Register a filter service.
337
+ * @property {function(Object.<string, Injectable<FilterFactory>>): Module} filter
338
+ * Register multiple filter services.
339
+ * @property {function(string, ServiceProviderFactory): Module} provider
340
+ * Register a provider service factory.
341
+ * @property {function(string, ServiceProviderClass): Module} provider
342
+ * Register a provider service constructor.
343
+ * @property {function(string, any[]): Module} provider
344
+ * Register a provider service with inline annotated constructor.
345
+ * @property {function(Injectable<Function>): Module} run
346
+ * Register code to be run during module loading.
347
+ * @property {function(string, Injectable<Function>): Module} service
348
+ * Register a service constructor.
349
+ * @property {function(Object.<string, Injectable<Function>>): Module} service
350
+ * Register multiple service constructors.
351
+ * @property {function<T>(string, T): Module} value
352
+ * Register a value service with the $injector.
353
+ * @property {function(Object): Module} value
354
+ * Register multiple value services.
355
+ * @property {function(string, Injectable<Function>): Module} decorator
356
+ * Register a service decorator with the $injector.
357
+ * @property {string} name
358
+ * The name of the AngularJS module.
359
+ * @property {string[]} requires
360
+ * Array of module names that this module depends on.
361
+ */
362
+
363
+ /**
364
+ * @typedef {Object} FormController
365
+ * @property {boolean} $pristine - True if the form has not been modified.
366
+ * @property {boolean} $dirty - True if the form has been modified.
367
+ * @property {boolean} $valid - True if the form is valid.
368
+ * @property {boolean} $invalid - True if the form is invalid.
369
+ * @property {boolean} $submitted - True if the form has been submitted.
370
+ * @property {Object.<string, Array.<NgModelController|FormController>>} $error - An object containing arrays of controls with validation errors keyed by validation error keys.
371
+ * @property {string|undefined} [$name] - The name of the form.
372
+ * @property {Object.<string, Array.<NgModelController|FormController>>|undefined} [$pending] - An object containing arrays of controls that are pending validation, keyed by validation error keys.
373
+ * @property {function(NgModelController|FormController): void} $addControl - Adds a control to the form.
374
+ * @property {function(): ReadonlyArray.<NgModelController|FormController>} $getControls - Returns an array of all controls in the form.
375
+ * @property {function(NgModelController|FormController): void} $removeControl - Removes a control from the form.
376
+ * @property {function(string, boolean, NgModelController|FormController): void} $setValidity - Sets the validity of a control in the form.
377
+ * @property {function(): void} $setDirty - Marks the form as dirty.
378
+ * @property {function(): void} $setPristine - Marks the form as pristine.
379
+ * @property {function(): void} $commitViewValue - Commits the view value of all controls in the form.
380
+ * @property {function(): void} $rollbackViewValue - Rolls back the view value of all controls in the form.
381
+ * @property {function(): void} $setSubmitted - Marks the form as submitted.
382
+ * @property {function(): void} $setUntouched - Marks the form controls as untouched.
383
+ * @property {function(string): any} [name] - An indexer for additional properties.
384
+ */
385
+
386
+ /**
387
+ * @typedef {Object} NgModelController
388
+ * @property {function(): void} $render - Renders the view value.
389
+ * @property {function(string, boolean): void} $setValidity - Sets the validity state.
390
+ * @property {function(any, string=): void} $setViewValue - Sets the view value.
391
+ * @property {function(): void} $setPristine - Marks the control as pristine.
392
+ * @property {function(): void} $setDirty - Marks the control as dirty.
393
+ * @property {function(): void} $validate - Validates the control.
394
+ * @property {function(): void} $setTouched - Marks the control as touched.
395
+ * @property {function(): void} $setUntouched - Marks the control as untouched.
396
+ * @property {function(): void} $rollbackViewValue - Rolls back the view value.
397
+ * @property {function(): void} $commitViewValue - Commits the view value.
398
+ * @property {function(): void} $processModelValue - Processes the model value.
399
+ * @property {function(any): boolean} $isEmpty - Checks if the value is empty.
400
+ * @property {function(NgModelOptions): void} $overrideModelOptions - Overrides model options.
401
+ * @property {*} $viewValue - The current view value.
402
+ * @property {*} $modelValue - The current model value.
403
+ * @property {Array.<function(any, any): boolean>} $parsers - Array of parsers.
404
+ * @property {Array.<function(any): any>} $formatters - Array of formatters.
405
+ * @property {Array.<function(): any>} $viewChangeListeners - Array of view change listeners.
406
+ * @property {Object.<string, boolean>} $error - Validation errors.
407
+ * @property {string|undefined} [$name] - The name of the control.
408
+ * @property {boolean} $touched - True if the control has been touched.
409
+ * @property {boolean} $untouched - True if the control has not been touched.
410
+ * @property {Object.<string, function(any, any): boolean>} $validators - Synchronous validators.
411
+ * @property {Object.<string, function(any, any): Promise<any>>} $asyncValidators - Asynchronous validators.
412
+ * @property {Object.<string, boolean>|undefined} [$pending] - Pending validation.
413
+ * @property {boolean} $pristine - True if the control is pristine.
414
+ * @property {boolean} $dirty - True if the control is dirty.
415
+ * @property {boolean} $valid - True if the control is valid.
416
+ * @property {boolean} $invalid - True if the control is invalid.
417
+ */
418
+
419
+ /**
420
+ * @typedef {Object} NgModelOptions
421
+ * @property {string|undefined} [updateOn] - The event to update on.
422
+ * @property {number|Object.<string, number>|undefined} [debounce] - The debounce delay.
423
+ * @property {boolean|undefined} [allowInvalid] - Allows invalid models.
424
+ * @property {boolean|undefined} [getterSetter] - Indicates if getter/setter syntax is allowed.
425
+ * @property {string|undefined} [timezone] - The timezone.
426
+ * @property {string|undefined} [timeSecondsFormat] - The format for seconds in time and datetime-local inputs.
427
+ * @property {boolean|undefined} [timeStripZeroSeconds] - Indicates if zero seconds should be stripped.
428
+ */
429
+
430
+ /**
431
+ * @typedef {Object.<string, function(any, any): boolean>} ModelValidators
432
+ * @property {function(any, any): boolean} [index] - Validator function for each index.
433
+ */
434
+
435
+ /**
436
+ * @typedef {Object.<string, function(any, any): Promise<any>>} AsyncModelValidators
437
+ * @property {function(any, any): IPromise<any>} [index] - Async validator function for each index.
438
+ */
439
+
440
+ /**
441
+ * @typedef {Object} InjectorService
442
+ * @property {function(Function, boolean=): string[]} annotate - Annotate a function or an array of inline annotations.
443
+ * @property {function(string, string=): any} get - Get a service by name.
444
+ * @property {function(Function, any?): any} instantiate - Instantiate a type constructor with optional locals.
445
+ * @property {function(Injectable<Function | ((...args: any[]) => any)>, any=, any=): any} invoke - Invoke a function with optional context and locals.
446
+ * @property {function(Array<Module | string | Injectable<(...args: any[]) => void>>): void} loadNewModules - Add and load new modules to the injector.
447
+ * @property {Object.<string, Module>} modules - A map of all the modules loaded into the injector.
448
+ * @property {boolean} strictDi - Indicates if strict dependency injection is enforced.
449
+ */
450
+
451
+ export {};
package/tsconfig.json CHANGED
@@ -13,5 +13,5 @@
13
13
  "typeRoots": ["node_modules/@types"]
14
14
  },
15
15
  "include": ["./src/*.js", "./**/*.ts"],
16
- "exclude": ["**/*.test.js", "**/*.spec.js"]
16
+ "exclude": ["./types-back/**", "**/*.test.js", "**/*.spec.js"]
17
17
  }