@angular-wave/angular.ts 0.0.38 → 0.0.40

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 (263) hide show
  1. package/Makefile +8 -5
  2. package/README.md +1 -1
  3. package/dist/angular-ts.esm.js +2 -1
  4. package/dist/angular-ts.umd.js +2 -1
  5. package/package.json +2 -4
  6. package/rollup.config.js +11 -2
  7. package/src/angular.spec.js +25 -26
  8. package/src/animations/animate-css-driver.js +3 -3
  9. package/src/animations/animate-queue.js +7 -7
  10. package/src/animations/animation.js +2 -2
  11. package/src/animations/shared.js +6 -6
  12. package/src/binding.spec.js +7 -7
  13. package/src/core/animate/animate.js +5 -5
  14. package/src/core/animate/animate.spec.js +31 -31
  15. package/src/core/cache/cache-factory.html +18 -0
  16. package/src/core/cache/{cache-factor.test.js → cache-factory.test.js} +1 -1
  17. package/src/core/compile/compile.js +31 -25
  18. package/src/core/compile/compile.md +2 -2
  19. package/src/core/cookie-reader.spec.js +2 -2
  20. package/src/core/core.html +22 -0
  21. package/src/core/core.test.js +12 -0
  22. package/src/core/document.spec.js +4 -4
  23. package/src/core/exception-handler.js +30 -23
  24. package/src/core/interpolate/interpolate.js +7 -0
  25. package/src/core/{cache/cache-factor.html → location/location.html} +1 -1
  26. package/src/core/location/location.js +2 -2
  27. package/src/core/location/location.spec.js +17 -17
  28. package/src/core/location/location.test.js +12 -0
  29. package/src/core/on.spec.js +3 -3
  30. package/src/core/parser/parse.html +18 -0
  31. package/src/core/parser/parse.spec.js +1 -1
  32. package/src/core/parser/parse.test.js +12 -0
  33. package/src/core/prop.spec.js +3 -4
  34. package/src/core/pubsub/pubsub.html +18 -0
  35. package/src/core/pubsub/pubsub.spec.js +1 -1
  36. package/src/core/pubsub/pubsub.test.js +12 -0
  37. package/src/core/q/q.html +18 -0
  38. package/src/core/q/q.js +33 -0
  39. package/src/core/q/q.test.js +0 -0
  40. package/src/core/root-element.spec.js +4 -4
  41. package/src/core/sanitize/sanitize-uri.spec.js +1 -1
  42. package/src/core/sanitize/sanitize-uri.test.js +12 -0
  43. package/src/core/sanitize/sanitize.html +21 -0
  44. package/src/core/sce/sce.html +18 -0
  45. package/src/core/sce/sce.spec.js +2 -1
  46. package/src/core/sce/sce.test.js +12 -0
  47. package/src/core/scope/scope.html +18 -0
  48. package/src/core/scope/scope.js +5 -8
  49. package/src/core/scope/scope.spec.js +1 -1
  50. package/src/core/scope/scope.test.js +12 -0
  51. package/src/core/task-tracker-factory.js +9 -11
  52. package/src/core/timeout/timeout.html +18 -0
  53. package/src/core/timeout/timeout.js +9 -0
  54. package/src/core/timeout/timeout.spec.js +2 -2
  55. package/src/core/timeout/timout.test.js +12 -0
  56. package/src/core/url-utils/url-utils.html +18 -0
  57. package/src/core/url-utils/url-utils.spec.js +4 -2
  58. package/src/core/url-utils/url-utils.test.js +12 -0
  59. package/src/directive/attrs/attrs.spec.js +1 -2
  60. package/src/directive/attrs/boolean.spec.js +1 -2
  61. package/src/directive/attrs/element-style.spec.js +6 -7
  62. package/src/directive/attrs/src.spec.js +1 -2
  63. package/src/directive/bind/bind.spec.js +1 -2
  64. package/src/directive/class/class.spec.js +15 -16
  65. package/src/directive/cloak/cloak.spec.js +3 -4
  66. package/src/directive/controller/controller.spec.js +4 -5
  67. package/src/directive/events/click.spec.js +1 -2
  68. package/src/directive/events/event.spec.js +1 -1
  69. package/src/directive/events/events.js +7 -0
  70. package/src/directive/form/form.spec.js +17 -17
  71. package/src/directive/if/if.spec.js +2 -2
  72. package/src/directive/include/include.js +2 -2
  73. package/src/directive/include/include.spec.js +32 -32
  74. package/src/directive/init/init.spec.js +2 -3
  75. package/src/directive/input/input.spec.js +3 -3
  76. package/src/directive/list/list.spec.js +1 -2
  77. package/src/directive/model/model.js +13 -0
  78. package/src/directive/model/model.spec.js +4 -5
  79. package/src/directive/model-options/model-options.spec.js +3 -3
  80. package/src/directive/non-bindable/non-bindable.spec.js +1 -2
  81. package/src/directive/options/options.js +5 -5
  82. package/src/directive/options/options.spec.js +13 -13
  83. package/src/directive/ref/href.spec.js +1 -2
  84. package/src/directive/repeat/repeat.spec.js +12 -12
  85. package/src/directive/script/script.spec.js +2 -3
  86. package/src/directive/select/select.js +6 -6
  87. package/src/directive/select/select.spec.js +5 -5
  88. package/src/directive/show-hide/show-hide.spec.js +12 -13
  89. package/src/directive/style/style.spec.js +3 -4
  90. package/src/directive/switch/switch.spec.js +2 -3
  91. package/src/directive/validators/validators.spec.js +1 -1
  92. package/src/exts/aria/aria.spec.js +1 -2
  93. package/src/exts/messages/messages.spec.js +5 -5
  94. package/src/filters/filter.spec.js +5 -5
  95. package/src/filters/filters.html +21 -0
  96. package/src/filters/filters.spec.js +3 -3
  97. package/src/filters/filters.test.js +12 -0
  98. package/src/filters/limit-to.md +1 -1
  99. package/src/filters/limit-to.spec.js +4 -4
  100. package/src/filters/order-by.spec.js +2 -2
  101. package/src/index.js +462 -1
  102. package/src/loader.js +62 -17
  103. package/src/public.js +6 -2
  104. package/src/router/directives/state-directives.spec.js +90 -90
  105. package/src/router/directives/view-directive.js +2 -2
  106. package/src/router/directives/view-directive.spec.js +9 -9
  107. package/src/router/state/state.spec.js +2 -4
  108. package/src/router/template-factory.spec.js +2 -2
  109. package/src/router/transition/hook-registry.js +2 -2
  110. package/src/router/view/view.spec.js +1 -1
  111. package/src/services/browser.js +56 -39
  112. package/src/services/document.js +16 -13
  113. package/src/services/log.js +39 -43
  114. package/src/services/template-request.js +9 -0
  115. package/src/shared/common.js +0 -3
  116. package/src/shared/jqlite/jqlite.js +83 -89
  117. package/src/shared/jqlite/jqlite.spec.js +218 -222
  118. package/src/shared/strings.js +2 -2
  119. package/src/shared/test-utils.js +2 -2
  120. package/src/shared/utils.js +8 -11
  121. package/src/src.test.js +10 -0
  122. package/tsconfig.json +1 -1
  123. package/tsconfig.types.json +11 -0
  124. package/types/animations/animate-cache.d.ts +7 -7
  125. package/types/animations/animate-children-directive.d.ts +3 -6
  126. package/types/animations/animate-swap.d.ts +7 -16
  127. package/types/animations/animation.d.ts +2 -11
  128. package/types/animations/raf-scheduler.d.ts +3 -3
  129. package/types/animations/shared.d.ts +9 -24
  130. package/types/core/{animate-css.d.ts → animate/animate-css.d.ts} +2 -8
  131. package/types/core/{cache.d.ts → cache/cache.d.ts} +5 -5
  132. package/types/core/compile/compile.d.ts +173 -0
  133. package/types/core/controller/controller.d.ts +32 -0
  134. package/types/core/exception-handler.d.ts +9 -42
  135. package/types/core/filter/filter.d.ts +9 -0
  136. package/types/core/{interpolate.d.ts → interpolate/interpolate.d.ts} +23 -39
  137. package/types/core/interval/interval-factory.d.ts +4 -0
  138. package/types/core/{interval.d.ts → interval/interval.d.ts} +1 -1
  139. package/types/core/location/location.d.ts +209 -0
  140. package/types/core/pubsub/pubsub.d.ts +156 -0
  141. package/types/core/q/q.d.ts +65 -0
  142. package/types/core/sanitize/sanitize-uri.d.ts +53 -0
  143. package/types/core/{sce.d.ts → sce/sce.d.ts} +80 -86
  144. package/types/core/scope/scope.d.ts +727 -0
  145. package/types/core/task-tracker-factory.d.ts +45 -38
  146. package/types/core/timeout/timeout.d.ts +29 -0
  147. package/types/core/{urlUtils.d.ts → url-utils/url-utils.d.ts} +2 -7
  148. package/types/directive/{bind.d.ts → bind/bind.d.ts} +4 -10
  149. package/types/directive/{class.d.ts → class/class.d.ts} +12 -21
  150. package/types/directive/controller/controller.d.ts +6 -0
  151. package/types/directive/events/events.d.ts +5 -0
  152. package/types/directive/form/form.d.ts +200 -0
  153. package/types/directive/if/if.d.ts +8 -0
  154. package/types/directive/include/include.d.ts +14 -0
  155. package/types/directive/{input.d.ts → input/input.d.ts} +20 -69
  156. package/types/directive/{model.d.ts → model/model.d.ts} +281 -280
  157. package/types/directive/options/options.d.ts +9 -0
  158. package/types/directive/ref/ref.d.ts +5 -0
  159. package/types/directive/repeat/repeat.d.ts +8 -0
  160. package/types/directive/{script.d.ts → script/script.d.ts} +5 -8
  161. package/types/directive/{show-hide.d.ts → show-hide/show-hide.d.ts} +10 -16
  162. package/types/directive/switch/switch.d.ts +17 -0
  163. package/types/directive/transclude/transclude.d.ts +4 -0
  164. package/types/directive/{validators.d.ts → validators/validators.d.ts} +20 -35
  165. package/types/filters/filters.d.ts +10 -16
  166. package/types/filters/order-by.d.ts +2 -4
  167. package/types/index.d.ts +702 -0
  168. package/types/injector.d.ts +12 -0
  169. package/types/public.d.ts +5 -0
  170. package/types/router/common/coreservices.d.ts +2 -2
  171. package/types/router/common/glob.d.ts +9 -9
  172. package/types/router/common/queue.d.ts +13 -13
  173. package/types/router/common/trace.d.ts +43 -43
  174. package/types/router/directives/view-directive.d.ts +13 -32
  175. package/types/router/globals.d.ts +20 -20
  176. package/types/router/hooks/lazy-load.d.ts +2 -11
  177. package/types/router/hooks/redirect-to.d.ts +1 -4
  178. package/types/router/hooks/url.d.ts +1 -5
  179. package/types/router/hooks/views.d.ts +1 -4
  180. package/types/router/params/param-factory.d.ts +5 -5
  181. package/types/router/params/param-type.d.ts +35 -35
  182. package/types/router/params/param-types.d.ts +11 -11
  183. package/types/router/params/param.d.ts +38 -38
  184. package/types/router/params/state-params.d.ts +10 -10
  185. package/types/router/path/path-node.d.ts +34 -34
  186. package/types/router/path/path-utils.d.ts +73 -77
  187. package/types/router/resolve/resolvable.d.ts +32 -32
  188. package/types/router/resolve/resolve-context.d.ts +84 -84
  189. package/types/router/services.d.ts +4 -9
  190. package/types/router/state/state-builder.d.ts +27 -27
  191. package/types/router/state/state-matcher.d.ts +5 -5
  192. package/types/router/state/state-object.d.ts +58 -58
  193. package/types/router/state/state-queue-manager.d.ts +10 -16
  194. package/types/router/state/state-registry.d.ts +100 -107
  195. package/types/router/state/state-service.d.ts +411 -411
  196. package/types/router/state/target-state.d.ts +64 -69
  197. package/types/router/state/views.d.ts +31 -37
  198. package/types/router/state-filters.d.ts +7 -7
  199. package/types/router/state-provider.d.ts +105 -105
  200. package/types/router/template-factory.d.ts +83 -112
  201. package/types/router/transition/hook-builder.d.ts +25 -25
  202. package/types/router/transition/hook-registry.d.ts +68 -83
  203. package/types/router/transition/interface.d.ts +7 -7
  204. package/types/router/transition/reject-factory.d.ts +34 -34
  205. package/types/router/transition/transition-event-type.d.ts +9 -18
  206. package/types/router/transition/transition-hook.d.ts +77 -82
  207. package/types/router/transition/transition-service.d.ts +82 -99
  208. package/types/router/transition/transition.d.ts +369 -377
  209. package/types/router/url/url-config.d.ts +84 -84
  210. package/types/router/url/url-matcher.d.ts +115 -119
  211. package/types/router/url/url-rule.d.ts +114 -124
  212. package/types/router/url/url-rules.d.ts +217 -217
  213. package/types/router/url/url-service.d.ts +264 -269
  214. package/types/router/view/view.d.ts +114 -117
  215. package/types/router/view-scroll.d.ts +2 -2
  216. package/types/services/anchor-scroll.d.ts +2 -8
  217. package/types/services/browser.d.ts +157 -135
  218. package/types/services/cache-factory.d.ts +25 -25
  219. package/types/services/cookie-reader.d.ts +2 -2
  220. package/types/services/document.d.ts +13 -9
  221. package/types/services/http/http.d.ts +145 -0
  222. package/types/services/{http-backend.d.ts → http-backend/http-backend.d.ts} +3 -35
  223. package/types/services/log.d.ts +55 -52
  224. package/types/services/template-request.d.ts +44 -53
  225. package/types/shared/common.d.ts +4 -20
  226. package/types/{constants.d.ts → shared/constants.d.ts} +6 -6
  227. package/types/shared/hof.d.ts +1 -1
  228. package/types/{jqLite.d.ts → shared/jqlite/jqlite.d.ts} +16 -17
  229. package/types/shared/test-utils.d.ts +11 -0
  230. package/types/shared/utils.d.ts +29 -46
  231. package/types-back/global.d.ts +3 -1
  232. package/types-back/index.d.ts +3 -296
  233. package/types/core/compile.d.ts +0 -206
  234. package/types/core/controller.d.ts +0 -42
  235. package/types/core/filter.d.ts +0 -9
  236. package/types/core/interval-factory.d.ts +0 -21
  237. package/types/core/location.d.ts +0 -234
  238. package/types/core/pubsub.d.ts +0 -164
  239. package/types/core/q.d.ts +0 -33
  240. package/types/core/root-scope.d.ts +0 -754
  241. package/types/core/sanitize-uri.d.ts +0 -57
  242. package/types/core/timeout.d.ts +0 -31
  243. package/types/directive/controller.d.ts +0 -6
  244. package/types/directive/events.d.ts +0 -12
  245. package/types/directive/form.d.ts +0 -230
  246. package/types/directive/if.d.ts +0 -17
  247. package/types/directive/include.d.ts +0 -33
  248. package/types/directive/options.d.ts +0 -16
  249. package/types/directive/ref.d.ts +0 -11
  250. package/types/directive/repeat.d.ts +0 -23
  251. package/types/directive/switch.d.ts +0 -23
  252. package/types/directive/transclude.d.ts +0 -15
  253. package/types/services/http.d.ts +0 -157
  254. /package/src/core/cache/{cache-factor.spec.js → cache-factory.spec.js} +0 -0
  255. /package/types/directive/{attrs.d.ts → attrs/attrs.d.ts} +0 -0
  256. /package/types/directive/{change.d.ts → change/change.d.ts} +0 -0
  257. /package/types/directive/{cloak.d.ts → cloak/cloak.d.ts} +0 -0
  258. /package/types/directive/{init.d.ts → init/init.d.ts} +0 -0
  259. /package/types/directive/{list.d.ts → list/list.d.ts} +0 -0
  260. /package/types/directive/{non-bindable.d.ts → non-bindable/non-bindable.d.ts} +0 -0
  261. /package/types/directive/{style.d.ts → style/style.d.ts} +0 -0
  262. /package/types/exts/{aria.d.ts → aria/aria.d.ts} +0 -0
  263. /package/types/exts/{messages.d.ts → messages/messages.d.ts} +0 -0
@@ -224,20 +224,14 @@ export function snakeCase(name: any, separator: any): any;
224
224
  * @param {Object=} context Object to become context (`this`) for the iterator function.
225
225
  * @returns {Object|Array} Reference to `obj`.
226
226
  */
227
- export function forEach(
228
- obj: any | any[],
229
- iterator: Function,
230
- context?: any | undefined,
231
- ): any | any[];
227
+ export function forEach(obj: any | any[], iterator: Function, context?: any | undefined): any | any[];
232
228
  export function forEachSorted(obj: any, iterator: any, context: any): string[];
233
229
  /**
234
230
  * when using forEach the params are value, key, but it is often useful to have key, value.
235
231
  * @param {function(string, *)} iteratorFn
236
232
  * @returns {function(*, string)}
237
233
  */
238
- export function reverseParams(
239
- iteratorFn: (arg0: string, arg1: any) => any,
240
- ): (arg0: any, arg1: string) => any;
234
+ export function reverseParams(iteratorFn: (arg0: string, arg1: any) => any): (arg0: any, arg1: string) => any;
241
235
  /**
242
236
  * Set or clear the hashkey for an object.
243
237
  * @param obj object
@@ -360,7 +354,7 @@ export function includes(array: any, obj: any): boolean;
360
354
  * @param {T} value - The value to remove.
361
355
  * @returns {number} - The index of the removed value, or -1 if the value was not found.
362
356
  */
363
- export function arrayRemove<T>(array: T[], value: T): number;
357
+ export function arrayRemove<T>(array: Array<T>, value: T): number;
364
358
  export function simpleCompare(a: any, b: any): boolean;
365
359
  /**
366
360
  * @module angular
@@ -500,10 +494,7 @@ export function bind(context: any, fn: any, ...args: any[]): Function;
500
494
  *
501
495
  * See https://github.com/angular/angular.js/pull/14221 for more information.
502
496
  */
503
- export function toJson(
504
- obj: any | any[] | Date | string | number | boolean,
505
- pretty?: boolean | number,
506
- ): string | undefined;
497
+ export function toJson(obj: any | any[] | Date | string | number | boolean, pretty?: boolean | number): string | undefined;
507
498
  /**
508
499
  * @module angular
509
500
  * @function fromJson
@@ -517,18 +508,14 @@ export function toJson(
517
508
  export function fromJson(json: string): any | any[] | string | number;
518
509
  export function timezoneToOffset(timezone: any, fallback: any): any;
519
510
  export function addDateMinutes(date: any, minutes: any): Date;
520
- export function convertTimezoneToLocal(
521
- date: any,
522
- timezone: any,
523
- reverse: any,
524
- ): Date;
511
+ export function convertTimezoneToLocal(date: any, timezone: any, reverse: any): Date;
525
512
  /**
526
513
  * Parses an escaped url query string into key-value pairs.
527
514
  * @param {string} keyValue
528
515
  * @returns {Object.<string,boolean|Array>}
529
516
  */
530
517
  export function parseKeyValue(keyValue: string): {
531
- [x: string]: boolean | any[];
518
+ [x: string]: boolean | any[];
532
519
  };
533
520
  export function toKeyValue(obj: any): string;
534
521
  /**
@@ -573,33 +560,7 @@ export function shallowCopy(src: any, dst: any): any;
573
560
  * throw error if the argument is falsy.
574
561
  */
575
562
  export function assertArg(arg: any, name: any, reason: any): any;
576
- export function assertArgFn(
577
- arg: any,
578
- name: any,
579
- acceptArrayAnnotation: any,
580
- ): any;
581
- export function minErr(module: any): (...args: any[]) => Error;
582
- export function toDebugString(obj: any): any;
583
- /**
584
- * Computes a hash of an 'obj'.
585
- * Hash of a:
586
- * string is string
587
- * number is number as string
588
- * object is either result of calling $$hashKey function on the object or uniquely generated id,
589
- * that is also assigned to the $$hashKey property of the object.
590
- *
591
- * @param {*} obj
592
- * @returns {string} hash string such that the same input will have the same hash string.
593
- * The resulting string key is in 'type:hashKey' format.
594
- */
595
- export function hashKey(obj: any): string;
596
- export function mergeClasses(a: any, b: any): any;
597
- /**
598
- * Converts all accepted directives format into proper directive name.
599
- * @param name Name to normalize
600
- */
601
- export function directiveNormalize(name: any): any;
602
- export const ngAttrPrefixes: string[];
563
+ export function assertArgFn(arg: any, name: any, acceptArrayAnnotation: any): any;
603
564
  /**
604
565
  * @description
605
566
  *
@@ -627,4 +588,26 @@ export const ngAttrPrefixes: string[];
627
588
  * @param {string} module The namespace to use for the new minErr instance.
628
589
  * @returns {function(string, string, ...*): Error} minErr instance
629
590
  */
591
+ export function minErr(module: string): (arg0: string, arg1: string, ...args: any[]) => Error;
592
+ export function toDebugString(obj: any): any;
593
+ /**
594
+ * Computes a hash of an 'obj'.
595
+ * Hash of a:
596
+ * string is string
597
+ * number is number as string
598
+ * object is either result of calling $$hashKey function on the object or uniquely generated id,
599
+ * that is also assigned to the $$hashKey property of the object.
600
+ *
601
+ * @param {*} obj
602
+ * @returns {string} hash string such that the same input will have the same hash string.
603
+ * The resulting string key is in 'type:hashKey' format.
604
+ */
605
+ export function hashKey(obj: any): string;
606
+ export function mergeClasses(a: any, b: any): any;
607
+ /**
608
+ * Converts all accepted directives format into proper directive name.
609
+ * @param name Name to normalize
610
+ */
611
+ export function directiveNormalize(name: any): any;
612
+ export const ngAttrPrefixes: string[];
630
613
  export const minErrConfig: {};
@@ -1,8 +1,10 @@
1
1
  /// <reference path="index.d.ts" />
2
2
 
3
+ import { Angular } from "../src/loader";
4
+
3
5
  declare global {
4
6
  interface Window {
5
- angular: ng.IAngularStatic;
7
+ angular: Angular;
6
8
  }
7
9
  }
8
10
 
@@ -9,13 +9,6 @@ declare global {
9
9
  }
10
10
  }
11
11
 
12
- export as namespace angular;
13
- export as namespace ng;
14
-
15
- // Support AMD require
16
- export = angular;
17
-
18
- import ng = angular;
19
12
  import { Obj } from "./router";
20
13
 
21
14
  ///////////////////////////////////////////////////////////////////////////////
@@ -39,11 +32,6 @@ declare namespace angular {
39
32
  $get: any;
40
33
  }
41
34
 
42
- interface IAngularBootstrapConfig {
43
- debugInfoEnabled: boolean;
44
- strictDi?: boolean | undefined;
45
- }
46
-
47
35
  ///////////////////////////////////////////////////////////////////////////
48
36
  // Module
49
37
  // see http://docs.angularjs.org/api/angular.Module
@@ -185,53 +173,6 @@ declare namespace angular {
185
173
  requires: string[];
186
174
  }
187
175
 
188
- ///////////////////////////////////////////////////////////////////////////
189
- // Attributes
190
- // see http://docs.angularjs.org/api/ng/type/$compile.directive.Attributes
191
- ///////////////////////////////////////////////////////////////////////////
192
- interface IAttributes {
193
- /**
194
- * this is necessary to be able to access the scoped attributes. it's not very elegant
195
- * because you have to use attrs['foo'] instead of attrs.foo but I don't know of a better way
196
- * this should really be limited to return string but it creates this problem: http://stackoverflow.com/q/17201854/165656
197
- */
198
- [name: string]: any;
199
-
200
- /**
201
- * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with x- or data-) to its normalized, camelCase form.
202
- *
203
- * Also there is special case for Moz prefix starting with upper case letter.
204
- *
205
- * For further information check out the guide on @see https://docs.angularjs.org/guide/directive#matching-directives
206
- */
207
- $normalize(name: string): string;
208
-
209
- /**
210
- * Adds and removes the appropriate CSS class values to the element based on the difference between
211
- * the new and old CSS class values (specified as newClasses and oldClasses).
212
- */
213
- $updateClass(newClasses: string, oldClasses: string): void;
214
-
215
- /**
216
- * Set DOM element attribute value.
217
- */
218
- $set(key: string, value: any): void;
219
-
220
- /**
221
- * Observes an interpolated attribute.
222
- * The observer function will be invoked once during the next $digest
223
- * following compilation. The observer is then invoked whenever the
224
- * interpolated value changes.
225
- */
226
- $observe<T>(name: string, fn: (value?: T) => any): Function;
227
-
228
- /**
229
- * A map of DOM element attribute names to the normalized name. This is needed
230
- * to do reverse lookup from normalized name back to actual name.
231
- */
232
- $attr: Object;
233
- }
234
-
235
176
  /**
236
177
  * form.FormController - type in module ng
237
178
  * see https://docs.angularjs.org/api/ng/type/form.FormController
@@ -850,79 +791,6 @@ declare namespace angular {
850
791
  register(name: string | {}): IServiceProvider;
851
792
  }
852
793
 
853
- ///////////////////////////////////////////////////////////////////////////
854
- // LocaleService
855
- // see http://docs.angularjs.org/api/ng/service/$locale
856
- ///////////////////////////////////////////////////////////////////////////
857
- interface ILocaleService {
858
- id: string;
859
-
860
- // These are not documented
861
- // Check angular's i18n files for exemples
862
- NUMBER_FORMATS: ILocaleNumberFormatDescriptor;
863
- DATETIME_FORMATS: ILocaleDateTimeFormatDescriptor;
864
- pluralCat(num: any): string;
865
- }
866
-
867
- interface ILocaleNumberFormatDescriptor {
868
- DECIMAL_SEP: string;
869
- GROUP_SEP: string;
870
- PATTERNS: ILocaleNumberPatternDescriptor[];
871
- CURRENCY_SYM: string;
872
- }
873
-
874
- interface ILocaleNumberPatternDescriptor {
875
- minInt: number;
876
- minFrac: number;
877
- maxFrac: number;
878
- posPre: string;
879
- posSuf: string;
880
- negPre: string;
881
- negSuf: string;
882
- gSize: number;
883
- lgSize: number;
884
- }
885
-
886
- interface ILocaleDateTimeFormatDescriptor {
887
- MONTH: string[];
888
- SHORTMONTH: string[];
889
- DAY: string[];
890
- SHORTDAY: string[];
891
- AMPMS: string[];
892
- medium: string;
893
- short: string;
894
- fullDate: string;
895
- longDate: string;
896
- mediumDate: string;
897
- shortDate: string;
898
- mediumTime: string;
899
- shortTime: string;
900
- }
901
-
902
- ///////////////////////////////////////////////////////////////////////////
903
- // LogService
904
- // see http://docs.angularjs.org/api/ng/service/$log
905
- // see http://docs.angularjs.org/api/ng/provider/$logProvider
906
- ///////////////////////////////////////////////////////////////////////////
907
- interface ILogService {
908
- debug: ILogCall;
909
- error: ILogCall;
910
- info: ILogCall;
911
- log: ILogCall;
912
- warn: ILogCall;
913
- }
914
-
915
- interface ILogProvider extends IServiceProvider {
916
- debugEnabled(): boolean;
917
- debugEnabled(enabled: boolean): ILogProvider;
918
- }
919
-
920
- // We define this as separate interface so we can reopen it later for
921
- // the ngMock module.
922
- interface ILogCall {
923
- (...args: any[]): void;
924
- }
925
-
926
794
  ///////////////////////////////////////////////////////////////////////////
927
795
  // ParseService
928
796
  // see http://docs.angularjs.org/api/ng/service/$parse
@@ -2139,59 +2007,6 @@ declare namespace angular {
2139
2007
  require?: { [controller: string]: string } | undefined;
2140
2008
  }
2141
2009
 
2142
- type IControllerConstructor =
2143
- | (new (...args: any[]) => IController) // Instead of classes, plain functions are often used as controller constructors, especially in examples.
2144
- | ((...args: any[]) => void | IController);
2145
-
2146
- /**
2147
- * Directive controllers have a well-defined lifecycle. Each controller can implement "lifecycle hooks". These are methods that
2148
- * will be called by Angular at certain points in the life cycle of the directive.
2149
- * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
2150
- * https://docs.angularjs.org/guide/component
2151
- */
2152
- interface IController {
2153
- /**
2154
- * Called on each controller after all the controllers on an element have been constructed and had their bindings
2155
- * initialized (and before the pre & post linking functions for the directives on this element). This is a good
2156
- * place to put initialization code for your controller.
2157
- */
2158
- $onInit?(): void;
2159
- /**
2160
- * Called on each turn of the digest cycle. Provides an opportunity to detect and act on changes.
2161
- * Any actions that you wish to take in response to the changes that you detect must be invoked from this hook;
2162
- * implementing this has no effect on when `$onChanges` is called. For example, this hook could be useful if you wish
2163
- * to perform a deep equality check, or to check a `Dat`e object, changes to which would not be detected by Angular's
2164
- * change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments; if detecting changes,
2165
- * you must store the previous value(s) for comparison to the current values.
2166
- */
2167
- $doCheck?(): void;
2168
- /**
2169
- * Called whenever one-way bindings are updated. The onChangesObj is a hash whose keys are the names of the bound
2170
- * properties that have changed, and the values are an {@link IChangesObject} object of the form
2171
- * { currentValue, previousValue, isFirstChange() }. Use this hook to trigger updates within a component such as
2172
- * cloning the bound value to prevent accidental mutation of the outer value.
2173
- */
2174
- $onChanges?(onChangesObj: IOnChangesObject): void;
2175
- /**
2176
- * Called on a controller when its containing scope is destroyed. Use this hook for releasing external resources,
2177
- * watches and event handlers.
2178
- */
2179
- $onDestroy?(): void;
2180
- /**
2181
- * Called after this controller's element and its children have been linked. Similar to the post-link function this
2182
- * hook can be used to set up DOM event handlers and do direct DOM manipulation. Note that child elements that contain
2183
- * templateUrl directives will not have been compiled and linked since they are waiting for their template to load
2184
- * asynchronously and their own compilation and linking has been suspended until that occurs. This hook can be considered
2185
- * analogous to the ngAfterViewInit and ngAfterContentInit hooks in Angular 2. Since the compilation process is rather
2186
- * different in Angular 1 there is no direct mapping and care should be taken when upgrading.
2187
- */
2188
- $postLink?(): void;
2189
-
2190
- // IController implementations frequently do not implement any of its methods.
2191
- // A string indexer indicates to TypeScript not to issue a weak type error in this case.
2192
- [s: string]: any;
2193
- }
2194
-
2195
2010
  /**
2196
2011
  * Interface for the $onInit lifecycle hook
2197
2012
  * https://docs.angularjs.org/api/ng/service/$compile#life-cycle-hooks
@@ -2263,26 +2078,12 @@ declare namespace angular {
2263
2078
  $postLink(): void;
2264
2079
  }
2265
2080
 
2266
- interface IOnChangesObject {
2267
- [property: string]: IChangesObject<any>;
2268
- }
2269
-
2270
- interface IChangesObject<T> {
2271
- currentValue: T;
2272
- previousValue: T;
2273
- isFirstChange(): boolean;
2274
- }
2275
-
2276
2081
  ///////////////////////////////////////////////////////////////////////////
2277
2082
  // Directive
2278
2083
  // see http://docs.angularjs.org/api/ng/provider/$compileProvider#directive
2279
2084
  // and http://docs.angularjs.org/guide/directive
2280
2085
  ///////////////////////////////////////////////////////////////////////////
2281
2086
 
2282
- type IDirectiveController =
2283
- | IController
2284
- | IController[]
2285
- | { [key: string]: IController };
2286
2087
 
2287
2088
  interface IDirectiveFactory<
2288
2089
  TScope extends Scope = Scope,
@@ -2297,102 +2098,9 @@ declare namespace angular {
2297
2098
  | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>;
2298
2099
  }
2299
2100
 
2300
- interface IDirectiveLinkFn<
2301
- TScope extends Scope = Scope,
2302
- TElement extends JQLite = JQLite,
2303
- TAttributes extends IAttributes = IAttributes,
2304
- TController extends IDirectiveController = IController,
2305
- > {
2306
- (
2307
- scope: TScope,
2308
- instanceElement: TElement,
2309
- instanceAttributes: TAttributes,
2310
- controller?: TController,
2311
- transclude?: ITranscludeFunction,
2312
- ): void;
2313
- }
2101
+
2314
2102
 
2315
- interface IDirectivePrePost<
2316
- TScope extends Scope = Scope,
2317
- TElement extends JQLite = JQLite,
2318
- TAttributes extends IAttributes = IAttributes,
2319
- TController extends IDirectiveController = IController,
2320
- > {
2321
- pre?:
2322
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
2323
- | undefined;
2324
- post?:
2325
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
2326
- | undefined;
2327
- }
2328
-
2329
- interface IDirectiveCompileFn<
2330
- TScope extends Scope = Scope,
2331
- TElement extends JQLite = JQLite,
2332
- TAttributes extends IAttributes = IAttributes,
2333
- TController extends IDirectiveController = IController,
2334
- > {
2335
- (
2336
- templateElement: TElement,
2337
- templateAttributes: TAttributes,
2338
- /**
2339
- * @deprecated
2340
- * Note: The transclude function that is passed to the compile function is deprecated,
2341
- * as it e.g. does not know about the right outer scope. Please use the transclude function
2342
- * that is passed to the link function instead.
2343
- */
2344
- transclude: ITranscludeFunction,
2345
- ):
2346
- | void
2347
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
2348
- | IDirectivePrePost<TScope, TElement, TAttributes, TController>;
2349
- }
2350
-
2351
- interface IDirective<
2352
- TScope extends Scope = Scope,
2353
- TElement extends JQLite = JQLite,
2354
- TAttributes extends IAttributes = IAttributes,
2355
- TController extends IDirectiveController = IController,
2356
- > {
2357
- compile?:
2358
- | IDirectiveCompileFn<TScope, TElement, TAttributes, TController>
2359
- | undefined;
2360
- controller?: string | Injectable<IControllerConstructor> | undefined;
2361
- controllerAs?: string | undefined;
2362
- /**
2363
- * Deprecation warning: although bindings for non-ES6 class controllers are currently bound to this before
2364
- * the controller constructor is called, this use is now deprecated. Please place initialization code that
2365
- * relies upon bindings inside a $onInit method on the controller, instead.
2366
- */
2367
- bindToController?:
2368
- | boolean
2369
- | { [boundProperty: string]: string }
2370
- | undefined;
2371
- link?:
2372
- | IDirectiveLinkFn<TScope, TElement, TAttributes, TController>
2373
- | IDirectivePrePost<TScope, TElement, TAttributes, TController>
2374
- | undefined;
2375
- multiElement?: boolean | undefined;
2376
- priority?: number | undefined;
2377
- /**
2378
- * @deprecated
2379
- */
2380
- replace?: boolean | undefined;
2381
- require?: string | string[] | { [controller: string]: string } | undefined;
2382
- restrict?: string | undefined;
2383
- scope?: boolean | { [boundProperty: string]: string } | undefined;
2384
- template?:
2385
- | string
2386
- | ((tElement: TElement, tAttrs: TAttributes) => string)
2387
- | undefined;
2388
- templateNamespace?: string | undefined;
2389
- templateUrl?:
2390
- | string
2391
- | ((tElement: TElement, tAttrs: TAttributes) => string)
2392
- | undefined;
2393
- terminal?: boolean | undefined;
2394
- transclude?: boolean | "element" | { [slot: string]: string } | undefined;
2395
- }
2103
+
2396
2104
 
2397
2105
  /**
2398
2106
  * These interfaces are kept for compatibility with older versions of these type definitions.
@@ -2434,9 +2142,8 @@ declare namespace angular {
2434
2142
  get(name: "$httpParamSerializerJQLike"): IHttpParamSerializer;
2435
2143
  get(name: "$interpolate"): IInterpolateService;
2436
2144
  get(name: "$interval"): IIntervalService;
2437
- get(name: "$locale"): ILocaleService;
2438
2145
  get(name: "$location"): ILocationService;
2439
- get(name: "$log"): ILogService;
2146
+ get(name: "$log"): LogService;
2440
2147
  get(name: "$parse"): IParseService;
2441
2148
  get(name: "$q"): IQService;
2442
2149
  get(name: "$rootElement"): IRootElementService;