@angular-wave/angular.ts 0.0.41 → 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 (72) hide show
  1. package/README.md +27 -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/core/compile/compile.js +1 -1
  6. package/src/core/compile/compile.md +2 -5
  7. package/src/core/exception-handler.js +6 -6
  8. package/src/core/interpolate/interpolate.js +1 -1
  9. package/src/core/location/location.spec.js +0 -4
  10. package/src/core/q/q.js +1 -1
  11. package/src/core/scope/scope.js +1 -1
  12. package/src/core/task-tracker-factory.js +2 -2
  13. package/src/core/timeout/timeout.js +1 -1
  14. package/src/core/url-utils/url-utils.js +0 -2
  15. package/src/directive/bind/bind.js +2 -2
  16. package/src/directive/change/change.js +1 -1
  17. package/src/directive/cloak/cloak.js +1 -1
  18. package/src/directive/events/events.js +1 -1
  19. package/src/directive/form/form.js +2 -2
  20. package/src/directive/init/init.js +1 -1
  21. package/src/directive/list/list.js +1 -1
  22. package/src/directive/model/model.js +1 -1
  23. package/src/directive/model-options/model-options.js +56 -421
  24. package/src/directive/model-options/model-options.md +407 -0
  25. package/src/directive/model-options/model-options.spec.js +1 -1
  26. package/src/directive/non-bindable/non-bindable.js +1 -2
  27. package/src/directive/style/style.js +1 -1
  28. package/src/directive/switch/switch.js +2 -2
  29. package/src/directive/transclude/transclude.js +2 -2
  30. package/src/index.js +0 -461
  31. package/src/loader.js +1 -1
  32. package/src/public.js +1 -1
  33. package/src/router/template-factory.js +2 -2
  34. package/src/router/view-scroll.js +1 -1
  35. package/src/services/browser.js +1 -1
  36. package/src/services/document.js +2 -2
  37. package/src/services/log.js +1 -1
  38. package/src/services/template-request.js +1 -1
  39. package/src/shared/jqlite/jqlite.js +52 -44
  40. package/src/shared/jqlite/jqlite.spec.js +0 -1
  41. package/src/shared/utils.js +1 -1
  42. package/src/types.js +447 -9
  43. package/tsconfig.json +1 -1
  44. package/types/animations/shared.d.ts +1 -1
  45. package/types/core/exception-handler.d.ts +5 -7
  46. package/types/core/interpolate/interpolate.d.ts +1 -1
  47. package/types/core/q/q.d.ts +1 -1
  48. package/types/core/task-tracker-factory.d.ts +5 -5
  49. package/types/core/timeout/timeout.d.ts +2 -2
  50. package/types/directive/bind/bind.d.ts +4 -4
  51. package/types/directive/change/change.d.ts +2 -2
  52. package/types/directive/cloak/cloak.d.ts +2 -2
  53. package/types/directive/init/init.d.ts +2 -2
  54. package/types/directive/list/list.d.ts +2 -2
  55. package/types/directive/model/model.d.ts +13 -7
  56. package/types/directive/model-options/model-options.d.ts +49 -0
  57. package/types/directive/non-bindable/non-bindable.d.ts +2 -3
  58. package/types/directive/style/style.d.ts +2 -2
  59. package/types/directive/switch/switch.d.ts +4 -4
  60. package/types/index.d.ts +1 -702
  61. package/types/public.d.ts +2 -2
  62. package/types/router/template-factory.d.ts +4 -4
  63. package/types/services/browser.d.ts +3 -3
  64. package/types/services/document.d.ts +4 -6
  65. package/types/services/log.d.ts +2 -2
  66. package/types/services/template-request.d.ts +1 -1
  67. package/types/shared/jqlite/jqlite.d.ts +10 -2
  68. package/types/shared/utils.d.ts +2 -2
  69. package/types/types.d.ts +437 -33
  70. package/types-back/index.d.ts +1 -27
  71. package/types-back/jqlite.d.ts +0 -81
  72. package/types-back/global.d.ts +0 -11
package/types/public.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Initializes `ng`, `animate`, `message`, `aria` and `router` modules.
3
- * @returns {import('./index').angular.Module} `ng`module
3
+ * @returns {import('./index').Module} `ng`module
4
4
  */
5
- export function publishExternalAPI(): import("./index").angular.Module;
5
+ export function publishExternalAPI(): import("./index").Module;
@@ -58,21 +58,21 @@ export class TemplateFactory {
58
58
  /**
59
59
  * Creates a template by invoking an injectable provider function.
60
60
  *
61
- * @param {angular.IInjectable} provider Function to invoke via `locals`
61
+ * @param {import('../types').Injectable<any>} provider Function to invoke via `locals`
62
62
  * @param {Function} injectFn a function used to invoke the template provider
63
63
  * @param {angular.ResolveContext} context
64
64
  * @return {string|Promise.<string>} The template html as a string, or a promise
65
65
  * for that string.
66
66
  */
67
- fromProvider(provider: angular.IInjectable, params: any, context: angular.ResolveContext): string | Promise<string>;
67
+ fromProvider(provider: import("../types").Injectable<any>, params: any, context: angular.ResolveContext): string | Promise<string>;
68
68
  /**
69
69
  * Creates a component's template by invoking an injectable provider function.
70
70
  *
71
- * @param {angular.IInjectable} provider Function to invoke via `locals`
71
+ * @param {import('../types').Injectable<any>} provider Function to invoke via `locals`
72
72
  * @param {Function} injectFn a function used to invoke the template provider
73
73
  * @return {string} The template html as a string: "<component-name input1='::$resolve.foo'></component-name>".
74
74
  */
75
- fromComponentProvider(provider: angular.IInjectable, params: any, context: any): string;
75
+ fromComponentProvider(provider: import("../types").Injectable<any>, params: any, context: any): string;
76
76
  /**
77
77
  * Creates a template from a component's name
78
78
  *
@@ -149,7 +149,7 @@ export class Browser {
149
149
  cancel: (deferId: number) => boolean;
150
150
  }
151
151
  /**
152
- * @typedef {import('../index').angular.ServiceProvider} angular.BrowserProvider
152
+ * @typedef {import('../types').ServiceProvider} angular.BrowserProvider
153
153
  * @description
154
154
  * This object has two goals:
155
155
  *
@@ -162,11 +162,11 @@ export class Browser {
162
162
  * @constructor
163
163
  * @this {angular.BrowserProvider}
164
164
  */
165
- export function BrowserProvider(this: import("../index").angular.ServiceProvider): void;
165
+ export function BrowserProvider(this: import("../types").ServiceProvider): void;
166
166
  export class BrowserProvider {
167
167
  $get: (string | (($$taskTrackerFactory: import("../core/task-tracker-factory").TaskTracker) => Browser))[];
168
168
  }
169
169
  export type UrlChangeListener = (arg0: string, arg1: string | null) => any;
170
170
  export namespace angular {
171
- type BrowserProvider = import("../index").angular.ServiceProvider;
171
+ type BrowserProvider = import("../types").ServiceProvider;
172
172
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @typedef {import('../index').angular.ServiceProvider} angular.DocumentProvider
2
+ * @typedef {import('../types').ServiceProvider} DocumentProvider
3
3
  * @description
4
4
  * A {@link angular.element jQuery or JQLite} wrapper for the browser's `window.document` object.
5
5
  *
@@ -22,9 +22,9 @@
22
22
  */
23
23
  /**
24
24
  * @constructor
25
- * @this {angular.DocumentProvider}
25
+ * @this {DocumentProvider}
26
26
  */
27
- export function $DocumentProvider(this: import("../index").angular.ServiceProvider): void;
27
+ export function $DocumentProvider(this: import("../types").ServiceProvider): void;
28
28
  export class $DocumentProvider {
29
29
  $get: () => JQLite;
30
30
  }
@@ -37,7 +37,5 @@ export function $$IsDocumentHiddenProvider(): void;
37
37
  export class $$IsDocumentHiddenProvider {
38
38
  $get: (string | (($document: import("../shared/jqlite/jqlite").JQLite, $rootScope: import("../core/scope/scope").Scope) => () => boolean))[];
39
39
  }
40
- export namespace angular {
41
- type DocumentProvider = import("../index").angular.ServiceProvider;
42
- }
40
+ export type DocumentProvider = import("../types").ServiceProvider;
43
41
  import { JQLite } from "../shared/jqlite/jqlite";
@@ -14,7 +14,7 @@
14
14
  */
15
15
  export let LogService: angular.LogService;
16
16
  /**
17
- * @typedef {import('../index').ServiceProvider} angular.LogProvider
17
+ * @typedef {import('../types').ServiceProvider} angular.LogProvider
18
18
  * @property {function(): boolean} debugEnabled - Function to get the current debug state.
19
19
  * @property {function(boolean): angular.LogProvider} debugEnabled - Function to enable or disable debug.
20
20
  */
@@ -62,5 +62,5 @@ export namespace angular {
62
62
  */
63
63
  warn: LogCall;
64
64
  };
65
- type LogProvider = any;
65
+ type LogProvider = import("../types").ServiceProvider;
66
66
  }
@@ -53,7 +53,7 @@ export class TemplateRequestProvider {
53
53
  *
54
54
  * @property {number} totalPendingRequests total amount of pending template requests being downloaded.
55
55
  */
56
- $get: (string | (($exceptionHandler: import("../core/exception-handler").angular.ErrorHandler, $templateCache: any, $http: any, $q: any, $sce: any) => {
56
+ $get: (string | (($exceptionHandler: import("../core/exception-handler").ErrorHandler, $templateCache: any, $http: any, $q: any, $sce: any) => {
57
57
  (tpl: any, ignoreRequestError: any): any;
58
58
  totalPendingRequests: number;
59
59
  }))[];
@@ -50,9 +50,17 @@ export class JQLite {
50
50
  controller(name?: string): any;
51
51
  /**
52
52
  * Return instance of injector attached to element
53
- * @returns {import('../../types').angular.InjectorService}
53
+ * @returns {import('../../types').InjectorService}
54
54
  */
55
- injector(): import("../../types").angular.InjectorService;
55
+ injector(): import("../../types").InjectorService;
56
+ /**
57
+ * Adds an event listener to each element in the JQLite collection.
58
+ *
59
+ * @param {string} type - The event type(s) to listen for. Multiple event types can be specified, separated by a space.
60
+ * @param {Function} fn - The function to execute when the event is triggered.
61
+ * @returns {JQLite} The JQLite collection for chaining.
62
+ */
63
+ on(type: string, fn: Function): JQLite;
56
64
  toString(): string;
57
65
  eq(index: any): JQLite;
58
66
  length: number;
@@ -586,9 +586,9 @@ export function assertArgFn(arg: any, name: any, acceptArrayAnnotation: any): an
586
586
  * should all be static strings, not variables or general expressions.
587
587
  *
588
588
  * @param {string} module The namespace to use for the new minErr instance.
589
- * @returns {function(string, string, ...*): Error} minErr instance
589
+ * @returns {function(string, ...*): Error} minErr instance
590
590
  */
591
- export function minErr(module: string): (arg0: string, arg1: string, ...args: any[]) => Error;
591
+ export function minErr(module: string): (arg0: string, ...args: any[]) => Error;
592
592
  export function toDebugString(obj: any): any;
593
593
  /**
594
594
  * Computes a hash of an 'obj'.
package/types/types.d.ts CHANGED
@@ -1,34 +1,438 @@
1
- export namespace angular {
2
- type InjectorService = {
3
- /**
4
- * Annotate a function or an array of inline annotations.
5
- */
6
- annotate: (arg0: Function, arg1: boolean | undefined) => string[];
7
- /**
8
- * Get a service by name.
9
- */
10
- get: (arg0: string, arg1: string | undefined) => T;
11
- /**
12
- * , any=): T} instantiate Instantiate a type constructor with optional locals.
13
- */
14
- "": new () => (...args: any[]) => any;
15
- /**
16
- * Invoke a function with optional context and locals.
17
- */
18
- invoke: (arg0: Injectable<Function | ((...args: any[]) => T)>, arg1: any | undefined, arg2: any | undefined) => T;
19
- /**
20
- * Add and load new modules to the injector.
21
- */
22
- loadNewModules: (arg0: Array<IModule | string | Injectable<(...args: any[]) => void>>) => void;
23
- /**
24
- * A map of all the modules loaded into the injector.
25
- */
26
- modules: {
27
- [x: string]: IModule;
28
- };
29
- /**
30
- * Indicates if strict dependency injection is enforced.
31
- */
32
- strictDi: boolean;
1
+ export type BootstrapConfig = any;
2
+ export type Injectable<T_1> = Function | Array<string | Function>;
3
+ export type ComponentOptions = any;
4
+ export type ControllerConstructor = Function;
5
+ export type OnChangesObject = any;
6
+ export type ChangesObject = any;
7
+ export type Controller = any;
8
+ export type Attributes = {
9
+ [x: string]: any;
10
+ };
11
+ export type TScope = import("./core/scope/scope").Scope;
12
+ export type TElement = import("./shared/jqlite/jqlite").JQLite;
13
+ export type TAttributes = Attributes;
14
+ export type TController = DirectiveController;
15
+ export type DirectiveController = Controller | Controller[] | {
16
+ [key: string]: Controller;
17
+ };
18
+ /**
19
+ * Compile function for an AngularJS directive.
20
+ */
21
+ export type DirectiveCompileFn = (templateElement: TElement, templateAttributes: TAttributes, transclude: TranscludeFunction) => any;
22
+ /**
23
+ * Link function for an AngularJS directive.
24
+ */
25
+ export type DirectiveLinkFn = (scope: TScope, instanceElement: TElement, instanceAttributes: TAttributes, controller?: TController, transclude?: TranscludeFunction) => void;
26
+ export type CloneAttachFunction = (clonedElement?: JQLite, scope?: Scope) => any;
27
+ /**
28
+ * This corresponds to $transclude passed to controllers and to the transclude function passed to link functions.
29
+ * https://docs.angularjs.org/api/ng/service/$compile#-controller-
30
+ * http://teropa.info/blog/2015/06/09/transclusion.html
31
+ */
32
+ export type TranscludeFunction = {
33
+ transcludeWithScope: (arg0: TScope, arg1: CloneAttachFunction, arg2: JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
34
+ transcludeWithoutScope: (arg0: CloneAttachFunction | undefined, arg1: JQLite | undefined, arg2: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
35
+ /**
36
+ * - Returns true if the specified slot contains content (i.e., one or more DOM nodes)
37
+ */
38
+ isSlotFilled: (arg0: string) => boolean;
39
+ };
40
+ export type transcludeWithScope = (arg0: TScope, arg1: CloneAttachFunction, arg2: JQLite | undefined, arg3: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
41
+ export type transcludeWithoutScope = (arg0: CloneAttachFunction | undefined, arg1: JQLite | undefined, arg2: string | undefined) => import("./shared/jqlite/jqlite").JQLite;
42
+ /**
43
+ * Represents the pre and post linking functions of a directive.
44
+ */
45
+ export type DirectivePrePost = {
46
+ /**
47
+ * The pre-linking function of the directive.
48
+ */
49
+ pre?: DirectiveLinkFn | undefined;
50
+ /**
51
+ * The post-linking function of the directive.
52
+ */
53
+ post?: DirectiveLinkFn | undefined;
54
+ };
55
+ /**
56
+ * Directive definition object.
57
+ */
58
+ export type Directive = {
59
+ /**
60
+ * Compile function for the directive.
61
+ */
62
+ compile?: DirectiveCompileFn | undefined;
63
+ /**
64
+ * Controller constructor or name.
65
+ */
66
+ controller?: string | Injectable<ControllerConstructor> | undefined;
67
+ /**
68
+ * Controller alias.
69
+ */
70
+ controllerAs?: string | undefined;
71
+ /**
72
+ * Bindings to controller.
73
+ */
74
+ bindToController?: boolean | {
75
+ [boundProperty: string]: string;
76
+ } | undefined;
77
+ /**
78
+ * Link function.
79
+ */
80
+ link?: DirectiveLinkFn | DirectivePrePost | undefined;
81
+ /**
82
+ * Multi-element directive flag.
83
+ */
84
+ multiElement?: boolean | undefined;
85
+ /**
86
+ * Skip all directives on element
87
+ */
88
+ priority?: number | undefined;
89
+ /**
90
+ * Directive priority.
91
+ */
92
+ terminal?: boolean | undefined;
93
+ /**
94
+ * Deprecated: Replace flag.
95
+ */
96
+ replace?: boolean | undefined;
97
+ /**
98
+ * Required controllers.
99
+ */
100
+ require?: string | string[] | {
101
+ [controller: string]: string;
102
+ } | undefined;
103
+ /**
104
+ * Restriction mode.
105
+ */
106
+ restrict?: string | undefined;
107
+ /**
108
+ * Scope options.
109
+ */
110
+ scope?: boolean | {
111
+ [boundProperty: string]: string;
112
+ } | undefined;
113
+ /**
114
+ * HTML template.
115
+ */
116
+ template?: string | ((tElement: TElement, tAttrs: TAttributes) => string) | undefined;
117
+ /**
118
+ * Template namespace.
119
+ */
120
+ templateNamespace?: string | undefined;
121
+ /**
122
+ * HTML template URL.
123
+ */
124
+ templateUrl?: string | ((tElement: TElement, tAttrs: TAttributes) => string) | undefined;
125
+ /**
126
+ * Transclusion options.
127
+ */
128
+ transclude?: boolean | "element" | {
129
+ [slot: string]: string;
130
+ } | undefined;
131
+ };
132
+ /**
133
+ * Factory function for creating directives.
134
+ */
135
+ export type DirectiveFactory = (...args: any[]) => Directive | DirectiveLinkFn;
136
+ export type FilterFunction = Function;
137
+ export type FilterFactory = Function;
138
+ /**
139
+ * Interface for a service provider class.
140
+ */
141
+ export type ServiceProviderClass = {
142
+ /**
143
+ * - The constructor for the service provider.
144
+ */
145
+ constructor: Function;
146
+ };
147
+ /**
148
+ * Interface for a service provider factory function.
149
+ */
150
+ export type ServiceProviderFactory = Function;
151
+ /**
152
+ * Interface for a service provider.
153
+ */
154
+ export type ServiceProvider = {
155
+ /**
156
+ * - The $get property that represents a service instance or a factory function.
157
+ */
158
+ $get: any;
159
+ };
160
+ export type Module = any;
161
+ export type FormController = {
162
+ /**
163
+ * - True if the form has not been modified.
164
+ */
165
+ $pristine: boolean;
166
+ /**
167
+ * - True if the form has been modified.
168
+ */
169
+ $dirty: boolean;
170
+ /**
171
+ * - True if the form is valid.
172
+ */
173
+ $valid: boolean;
174
+ /**
175
+ * - True if the form is invalid.
176
+ */
177
+ $invalid: boolean;
178
+ /**
179
+ * - True if the form has been submitted.
180
+ */
181
+ $submitted: boolean;
182
+ /**
183
+ * - An object containing arrays of controls with validation errors keyed by validation error keys.
184
+ */
185
+ $error: {
186
+ [x: string]: Array<NgModelController | FormController>;
33
187
  };
34
- }
188
+ /**
189
+ * - The name of the form.
190
+ */
191
+ $name?: string | undefined;
192
+ /**
193
+ * - An object containing arrays of controls that are pending validation, keyed by validation error keys.
194
+ */
195
+ $pending?: {
196
+ [x: string]: Array<NgModelController | FormController>;
197
+ } | undefined;
198
+ /**
199
+ * - Adds a control to the form.
200
+ */
201
+ $addControl: (arg0: NgModelController | FormController) => void;
202
+ /**
203
+ * - Returns an array of all controls in the form.
204
+ */
205
+ $getControls: () => ReadonlyArray<NgModelController | FormController>;
206
+ /**
207
+ * - Removes a control from the form.
208
+ */
209
+ $removeControl: (arg0: NgModelController | FormController) => void;
210
+ /**
211
+ * - Sets the validity of a control in the form.
212
+ */
213
+ $setValidity: (arg0: string, arg1: boolean, arg2: NgModelController | FormController) => void;
214
+ /**
215
+ * - Marks the form as dirty.
216
+ */
217
+ $setDirty: () => void;
218
+ /**
219
+ * - Marks the form as pristine.
220
+ */
221
+ $setPristine: () => void;
222
+ /**
223
+ * - Commits the view value of all controls in the form.
224
+ */
225
+ $commitViewValue: () => void;
226
+ /**
227
+ * - Rolls back the view value of all controls in the form.
228
+ */
229
+ $rollbackViewValue: () => void;
230
+ /**
231
+ * - Marks the form as submitted.
232
+ */
233
+ $setSubmitted: () => void;
234
+ /**
235
+ * - Marks the form controls as untouched.
236
+ */
237
+ $setUntouched: () => void;
238
+ /**
239
+ * - An indexer for additional properties.
240
+ */
241
+ name?: (arg0: string) => any;
242
+ };
243
+ export type NgModelController = {
244
+ /**
245
+ * - Renders the view value.
246
+ */
247
+ $render: () => void;
248
+ /**
249
+ * - Sets the validity state.
250
+ */
251
+ $setValidity: (arg0: string, arg1: boolean) => void;
252
+ /**
253
+ * - Sets the view value.
254
+ */
255
+ $setViewValue: (arg0: any, arg1: string | undefined) => void;
256
+ /**
257
+ * - Marks the control as pristine.
258
+ */
259
+ $setPristine: () => void;
260
+ /**
261
+ * - Marks the control as dirty.
262
+ */
263
+ $setDirty: () => void;
264
+ /**
265
+ * - Validates the control.
266
+ */
267
+ $validate: () => void;
268
+ /**
269
+ * - Marks the control as touched.
270
+ */
271
+ $setTouched: () => void;
272
+ /**
273
+ * - Marks the control as untouched.
274
+ */
275
+ $setUntouched: () => void;
276
+ /**
277
+ * - Rolls back the view value.
278
+ */
279
+ $rollbackViewValue: () => void;
280
+ /**
281
+ * - Commits the view value.
282
+ */
283
+ $commitViewValue: () => void;
284
+ /**
285
+ * - Processes the model value.
286
+ */
287
+ $processModelValue: () => void;
288
+ /**
289
+ * - Checks if the value is empty.
290
+ */
291
+ $isEmpty: (arg0: any) => boolean;
292
+ /**
293
+ * - Overrides model options.
294
+ */
295
+ $overrideModelOptions: (arg0: NgModelOptions) => void;
296
+ /**
297
+ * - The current view value.
298
+ */
299
+ $viewValue: any;
300
+ /**
301
+ * - The current model value.
302
+ */
303
+ $modelValue: any;
304
+ /**
305
+ * - Array of parsers.
306
+ */
307
+ $parsers: Array<(arg0: any, arg1: any) => boolean>;
308
+ /**
309
+ * - Array of formatters.
310
+ */
311
+ $formatters: Array<(arg0: any) => any>;
312
+ /**
313
+ * - Array of view change listeners.
314
+ */
315
+ $viewChangeListeners: Array<() => any>;
316
+ /**
317
+ * - Validation errors.
318
+ */
319
+ $error: {
320
+ [x: string]: boolean;
321
+ };
322
+ /**
323
+ * - The name of the control.
324
+ */
325
+ $name?: string | undefined;
326
+ /**
327
+ * - True if the control has been touched.
328
+ */
329
+ $touched: boolean;
330
+ /**
331
+ * - True if the control has not been touched.
332
+ */
333
+ $untouched: boolean;
334
+ /**
335
+ * - Synchronous validators.
336
+ */
337
+ $validators: {
338
+ [x: string]: (arg0: any, arg1: any) => boolean;
339
+ };
340
+ /**
341
+ * - Asynchronous validators.
342
+ */
343
+ $asyncValidators: {
344
+ [x: string]: (arg0: any, arg1: any) => Promise<any>;
345
+ };
346
+ /**
347
+ * - Pending validation.
348
+ */
349
+ $pending?: {
350
+ [x: string]: boolean;
351
+ } | undefined;
352
+ /**
353
+ * - True if the control is pristine.
354
+ */
355
+ $pristine: boolean;
356
+ /**
357
+ * - True if the control is dirty.
358
+ */
359
+ $dirty: boolean;
360
+ /**
361
+ * - True if the control is valid.
362
+ */
363
+ $valid: boolean;
364
+ /**
365
+ * - True if the control is invalid.
366
+ */
367
+ $invalid: boolean;
368
+ };
369
+ export type NgModelOptions = {
370
+ /**
371
+ * - The event to update on.
372
+ */
373
+ updateOn?: string | undefined;
374
+ /**
375
+ * - The debounce delay.
376
+ */
377
+ debounce?: number | {
378
+ [x: string]: number;
379
+ } | undefined;
380
+ /**
381
+ * - Allows invalid models.
382
+ */
383
+ allowInvalid?: boolean | undefined;
384
+ /**
385
+ * - Indicates if getter/setter syntax is allowed.
386
+ */
387
+ getterSetter?: boolean | undefined;
388
+ /**
389
+ * - The timezone.
390
+ */
391
+ timezone?: string | undefined;
392
+ /**
393
+ * - The format for seconds in time and datetime-local inputs.
394
+ */
395
+ timeSecondsFormat?: string | undefined;
396
+ /**
397
+ * - Indicates if zero seconds should be stripped.
398
+ */
399
+ timeStripZeroSeconds?: boolean | undefined;
400
+ };
401
+ export type ModelValidators = {
402
+ [x: string]: (arg0: any, arg1: any) => boolean;
403
+ };
404
+ export type AsyncModelValidators = {
405
+ [x: string]: (arg0: any, arg1: any) => Promise<any>;
406
+ };
407
+ export type InjectorService = {
408
+ /**
409
+ * - Annotate a function or an array of inline annotations.
410
+ */
411
+ annotate: (arg0: Function, arg1: boolean | undefined) => string[];
412
+ /**
413
+ * - Get a service by name.
414
+ */
415
+ get: (arg0: string, arg1: string | undefined) => any;
416
+ /**
417
+ * - Instantiate a type constructor with optional locals.
418
+ */
419
+ instantiate: (arg0: Function, arg1: any | null) => any;
420
+ /**
421
+ * - Invoke a function with optional context and locals.
422
+ */
423
+ invoke: (arg0: Injectable<Function | ((...args: any[]) => any)>, arg1: any | undefined, arg2: any | undefined) => any;
424
+ /**
425
+ * - Add and load new modules to the injector.
426
+ */
427
+ loadNewModules: (arg0: Array<Module | string | Injectable<(...args: any[]) => void>>) => void;
428
+ /**
429
+ * - A map of all the modules loaded into the injector.
430
+ */
431
+ modules: {
432
+ [x: string]: Module;
433
+ };
434
+ /**
435
+ * - Indicates if strict dependency injection is enforced.
436
+ */
437
+ strictDi: boolean;
438
+ };
@@ -27,11 +27,6 @@ declare namespace angular {
27
27
  (...args: any[]): IServiceProvider;
28
28
  }
29
29
 
30
- // All service providers extend this interface
31
- interface IServiceProvider {
32
- $get: any;
33
- }
34
-
35
30
  ///////////////////////////////////////////////////////////////////////////
36
31
  // Module
37
32
  // see http://docs.angularjs.org/api/angular.Module
@@ -141,7 +136,7 @@ declare namespace angular {
141
136
  /**
142
137
  * Run blocks are the closest thing in Angular to the main method. A run block is the code which needs to run to kickstart the application. It is executed after all of the service have been configured and the injector has been created. Run blocks typically contain code which is hard to unit-test, and for this reason should be declared in isolated modules, so that they can be ignored in the unit-tests.
143
138
  */
144
- run(initializationFunction: Injectable<Function>): IModule;
139
+ run(initializationFuncti Injectable<Function>): IModule;
145
140
  /**
146
141
  * Register a service constructor, which will be invoked with new to create the service instance. This is short for registering a service where its provider's $get property is a factory function that returns an instance instantiated by the injector from the service constructor function.
147
142
  *
@@ -259,27 +254,6 @@ declare namespace angular {
259
254
  $invalid: boolean;
260
255
  }
261
256
 
262
- // Allows tuning how model updates are done.
263
- // https://docs.angularjs.org/api/ng/directive/ngModelOptions
264
- interface INgModelOptions {
265
- updateOn?: string | undefined;
266
- debounce?: number | { [key: string]: number } | undefined;
267
- allowInvalid?: boolean | undefined;
268
- getterSetter?: boolean | undefined;
269
- timezone?: string | undefined;
270
- /**
271
- * Defines if the time and datetime-local types should show seconds and milliseconds.
272
- * The option follows the format string of date filter.
273
- * By default, the options is undefined which is equal to 'ss.sss' (seconds and milliseconds)
274
- */
275
- timeSecondsFormat?: string | undefined;
276
- /**
277
- * Defines if the time and datetime-local types should strip the seconds and milliseconds
278
- * from the formatted value if they are zero. This option is applied after `timeSecondsFormat`
279
- */
280
- timeStripZeroSeconds?: boolean | undefined;
281
- }
282
-
283
257
  interface IModelValidators {
284
258
  /**
285
259
  * viewValue is any because it can be an object that is called in the view like $viewValue.name:$viewValue.subName