@angular-wave/angular.ts 0.3.0 → 0.3.1

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 (93) hide show
  1. package/dist/angular-ts.esm.js +2 -2
  2. package/dist/angular-ts.umd.js +2 -2
  3. package/package.json +1 -1
  4. package/src/animations/animate-cache.js +1 -1
  5. package/src/animations/animate-css-driver.js +2 -2
  6. package/src/animations/animate-css.js +1 -1
  7. package/src/animations/animate-js-driver.js +2 -2
  8. package/src/animations/animate-js.js +2 -2
  9. package/src/animations/animate-queue.js +2 -2
  10. package/src/animations/animation.js +1 -1
  11. package/src/core/cache/cache-factory.js +18 -2
  12. package/src/core/compile/compile.js +9 -11
  13. package/src/core/compile/compile.spec.js +0 -1
  14. package/src/core/controller/controller.js +1 -1
  15. package/src/core/exception-handler.js +1 -1
  16. package/src/core/filter/filter.js +2 -2
  17. package/src/core/interpolate/interpolate.js +3 -3
  18. package/src/core/interval/interval-factory.js +1 -1
  19. package/src/core/interval/interval.js +1 -1
  20. package/src/core/location/location.js +1 -1
  21. package/src/core/location/location.spec.js +3 -3
  22. package/src/core/parser/parse.js +2 -2
  23. package/src/core/sce/sce.js +2 -2
  24. package/src/core/scope/scope.js +1 -1
  25. package/src/core/task-tracker-factory.js +1 -1
  26. package/src/core/timeout/timeout.js +3 -3
  27. package/src/directive/if/if.js +5 -5
  28. package/src/directive/script/script.js +11 -9
  29. package/src/directive/validators/validators.js +70 -42
  30. package/src/public.js +56 -60
  31. package/src/router/params/param.js +1 -2
  32. package/src/router/path/path-node.js +5 -5
  33. package/src/router/path/path-utils.js +19 -21
  34. package/src/router/state/state-builder.js +17 -11
  35. package/src/router/state/state-queue-manager.js +16 -7
  36. package/src/router/state/state-registry.js +9 -5
  37. package/src/router/state/state-service.js +4 -8
  38. package/src/router/template-factory.js +2 -2
  39. package/src/router/transition/transition-service.js +1 -1
  40. package/src/router/transition/transition.js +13 -11
  41. package/src/router/url/url-matcher.js +2 -2
  42. package/src/router/url/url-service.js +1 -1
  43. package/src/router/view/view.js +3 -3
  44. package/src/services/http/http.js +2 -82
  45. package/src/services/http/http.spec.js +0 -118
  46. package/src/services/http/template-request.spec.js +10 -12
  47. package/src/services/http-backend/http-backend.js +1 -1
  48. package/src/services/log.js +1 -1
  49. package/src/services/template-request.js +3 -3
  50. package/src/shared/common.js +3 -9
  51. package/src/shared/hof.js +6 -8
  52. package/src/types.js +0 -14
  53. package/types/animations/animate-cache.d.ts +2 -2
  54. package/types/animations/animate-css-driver.d.ts +3 -3
  55. package/types/animations/animate-css.d.ts +2 -2
  56. package/types/animations/animate-js-driver.d.ts +3 -3
  57. package/types/animations/animate-js.d.ts +3 -3
  58. package/types/animations/animate-queue.d.ts +3 -3
  59. package/types/animations/animation.d.ts +2 -2
  60. package/types/core/cache/cache-factory.d.ts +20 -2
  61. package/types/core/compile/attributes.d.ts +1 -1
  62. package/types/core/compile/compile.d.ts +11 -11
  63. package/types/core/controller/controller.d.ts +1 -1
  64. package/types/core/exception-handler.d.ts +2 -3
  65. package/types/core/filter/filter.d.ts +3 -3
  66. package/types/core/interpolate/interpolate.d.ts +6 -6
  67. package/types/core/interval/interval-factory.d.ts +2 -2
  68. package/types/core/interval/interval.d.ts +2 -2
  69. package/types/core/location/location.d.ts +2 -2
  70. package/types/core/parser/parse.d.ts +4 -4
  71. package/types/core/sce/sce.d.ts +4 -4
  72. package/types/core/scope/scope.d.ts +1 -1
  73. package/types/core/task-tracker-factory.d.ts +1 -1
  74. package/types/core/timeout/timeout.d.ts +1 -2
  75. package/types/directive/script/script.d.ts +8 -5
  76. package/types/directive/validators/validators.d.ts +3 -15
  77. package/types/router/path/path-node.d.ts +0 -7
  78. package/types/router/path/path-utils.d.ts +7 -2
  79. package/types/router/state/state-queue-manager.d.ts +13 -3
  80. package/types/router/state/state-registry.d.ts +5 -2
  81. package/types/router/state/state-service.d.ts +1 -1
  82. package/types/router/template-factory.d.ts +3 -3
  83. package/types/router/transition/transition-service.d.ts +1 -1
  84. package/types/router/transition/transition.d.ts +3 -3
  85. package/types/router/url/url-service.d.ts +3 -3
  86. package/types/services/http/http.d.ts +4 -48
  87. package/types/services/http-backend/http-backend.d.ts +2 -2
  88. package/types/services/log.d.ts +2 -3
  89. package/types/services/template-request.d.ts +1 -1
  90. package/types/shared/common.d.ts +0 -5
  91. package/types/shared/hof.d.ts +0 -1
  92. package/types/types.d.ts +1 -1
  93. package/src/directive/csp.md +0 -63
@@ -1,5 +1,5 @@
1
1
  import { equals, applyPairs, removeFrom, find } from "../../shared/common";
2
- import { curry, prop } from "../../shared/hof";
2
+ import { curry } from "../../shared/hof";
3
3
  import { trace } from "../common/trace";
4
4
  import { getNg1ViewConfigFactory } from "../state/views";
5
5
  /**
@@ -177,7 +177,7 @@ export class ViewService {
177
177
  * @return {Array} Returns an array of fully-qualified view names.
178
178
  */
179
179
  available() {
180
- return this._ngViews.map(prop("fqn"));
180
+ return this._ngViews.map((x) => x.fqn);
181
181
  }
182
182
  /**
183
183
  * Returns the list of views on the page containing loaded content.
@@ -185,7 +185,7 @@ export class ViewService {
185
185
  * @return {Array} Returns an array of fully-qualified view names.
186
186
  */
187
187
  active() {
188
- return this._ngViews.filter(prop("$config")).map(prop("name"));
188
+ return this._ngViews.filter((x) => x.$config).map((x) => x.name);
189
189
  }
190
190
  }
191
191
  /**
@@ -54,7 +54,7 @@ function serializeValue(v) {
54
54
  *
55
55
  * Note that serializer will sort the request parameters alphabetically.
56
56
  */
57
- export function $HttpParamSerializerProvider() {
57
+ export function HttpParamSerializerProvider() {
58
58
  this.$get = function () {
59
59
  return function ngParamSerializer(params) {
60
60
  if (!params) return "";
@@ -82,86 +82,6 @@ export function $HttpParamSerializerProvider() {
82
82
  };
83
83
  }
84
84
 
85
- /**
86
- *
87
- * Alternative {@link $http `$http`} params serializer that follows
88
- * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.
89
- * The serializer will also sort the params alphabetically.
90
- *
91
- * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:
92
- *
93
- * ```js
94
- * $http({
95
- * url: myUrl,
96
- * method: 'GET',
97
- * params: myParams,
98
- * paramSerializer: '$httpParamSerializerJQLike'
99
- * });
100
- * ```
101
- *
102
- * It is also possible to set it as the default `paramSerializer` in the
103
- * {@link $httpProvider#defaults `$httpProvider`}.
104
- *
105
- * Additionally, you can inject the serializer and use it explicitly, for example to serialize
106
- * form data for submission:
107
- *
108
- * ```js
109
- * .controller(function($http, $httpParamSerializerJQLike) {
110
- * //...
111
- *
112
- * $http({
113
- * url: myUrl,
114
- * method: 'POST',
115
- * data: $httpParamSerializerJQLike(myData),
116
- * headers: {
117
- * 'Content-Type': 'application/x-www-form-urlencoded'
118
- * }
119
- * });
120
- *
121
- * });
122
- * ```
123
- *
124
- */
125
- export function $HttpParamSerializerJQLikeProvider() {
126
- this.$get = function () {
127
- return function jQueryLikeParamSerializer(params) {
128
- if (!params) return "";
129
- const parts = [];
130
- serialize(params, "", true);
131
- return parts.join("&");
132
-
133
- function serialize(toSerialize, prefix, topLevel) {
134
- if (Array.isArray(toSerialize)) {
135
- forEach(toSerialize, (value, index) => {
136
- serialize(value, `${prefix}[${isObject(value) ? index : ""}]`);
137
- });
138
- } else if (isObject(toSerialize) && !isDate(toSerialize)) {
139
- Object.keys(toSerialize)
140
- .sort()
141
- .forEach((key) => {
142
- const value = toSerialize[key];
143
- serialize(
144
- value,
145
- prefix + (topLevel ? "" : "[") + key + (topLevel ? "" : "]"),
146
- );
147
- });
148
- } else {
149
- if (isFunction(toSerialize)) {
150
- toSerialize = toSerialize();
151
- }
152
- parts.push(
153
- `${encodeUriQuery(prefix)}=${
154
- toSerialize == null
155
- ? ""
156
- : encodeUriQuery(serializeValue(toSerialize))
157
- }`,
158
- );
159
- }
160
- }
161
- };
162
- };
163
- }
164
-
165
85
  export function defaultHttpResponseTransform(data, headers) {
166
86
  if (isString(data)) {
167
87
  // Strip json vulnerability protection prefix and trim whitespace
@@ -297,7 +217,7 @@ function isSuccess(status) {
297
217
  /**
298
218
  * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.
299
219
  */
300
- export function $HttpProvider() {
220
+ export function HttpProvider() {
301
221
  /**
302
222
  * Object containing default values for all {@link ng.$http $http} requests.
303
223
  *
@@ -1065,124 +1065,6 @@ describe("$http", function () {
1065
1065
  expect(res.config.method).toBe("GET");
1066
1066
  });
1067
1067
 
1068
- describe("JQ-like param serialization", function () {
1069
- it("is possible", async function () {
1070
- await $http({
1071
- url: "/mock/hello",
1072
- params: {
1073
- a: 42,
1074
- b: 43,
1075
- },
1076
- paramSerializer: "$httpParamSerializerJQLike",
1077
- }).then(function (r) {
1078
- response = r;
1079
- });
1080
- $rootScope.$apply();
1081
-
1082
- expect(
1083
- response.config
1084
- .paramSerializer(response.config.params)
1085
- .endsWith("a=42&b=43"),
1086
- ).toBeTrue();
1087
- });
1088
-
1089
- it("serializes null and undefined elements as empty", async function () {
1090
- await $http({
1091
- url: "/mock/hello",
1092
- params: {
1093
- a: null,
1094
- b: undefined,
1095
- },
1096
- paramSerializer: "$httpParamSerializerJQLike",
1097
- }).then(function (r) {
1098
- response = r;
1099
- });
1100
- $rootScope.$apply();
1101
-
1102
- expect(
1103
- response.config
1104
- .paramSerializer(response.config.params)
1105
- .endsWith("a=&b="),
1106
- ).toBeTrue();
1107
- });
1108
-
1109
- it("uses square brackets in arrays", async function () {
1110
- await $http({
1111
- url: "/mock/hello",
1112
- params: {
1113
- a: [42, 43],
1114
- },
1115
- paramSerializer: "$httpParamSerializerJQLike",
1116
- }).then(function (r) {
1117
- response = r;
1118
- });
1119
- $rootScope.$apply();
1120
-
1121
- expect(
1122
- response.config
1123
- .paramSerializer(response.config.params)
1124
- .endsWith("a%5B%5D=42&a%5B%5D=43"),
1125
- ).toBeTrue();
1126
- });
1127
-
1128
- it("uses square brackets in objects", async function () {
1129
- await $http({
1130
- url: "/mock/hello",
1131
- params: {
1132
- a: { b: 42, c: 43 },
1133
- },
1134
- paramSerializer: "$httpParamSerializerJQLike",
1135
- }).then(function (r) {
1136
- response = r;
1137
- });
1138
- $rootScope.$apply();
1139
-
1140
- expect(
1141
- response.config
1142
- .paramSerializer(response.config.params)
1143
- .endsWith("a%5Bb%5D=42&a%5Bc%5D=43"),
1144
- ).toBeTrue();
1145
- });
1146
-
1147
- it("supports nesting in objects", async function () {
1148
- await $http({
1149
- url: "/mock/hello",
1150
- params: {
1151
- a: { b: { c: 42 } },
1152
- },
1153
- paramSerializer: "$httpParamSerializerJQLike",
1154
- }).then(function (r) {
1155
- response = r;
1156
- });
1157
- $rootScope.$apply();
1158
-
1159
- expect(
1160
- response.config
1161
- .paramSerializer(response.config.params)
1162
- .endsWith("a%5Bb%5D%5Bc%5D=42"),
1163
- ).toBeTrue();
1164
- });
1165
-
1166
- it("appends array indexes when items are objects", async function () {
1167
- await $http({
1168
- url: "/mock/hello",
1169
- params: {
1170
- a: [{ b: 42 }],
1171
- },
1172
- paramSerializer: "$httpParamSerializerJQLike",
1173
- }).then(function (r) {
1174
- response = r;
1175
- });
1176
- $rootScope.$apply();
1177
-
1178
- expect(
1179
- response.config
1180
- .paramSerializer(response.config.params)
1181
- .endsWith("a%5B0%5D%5Bb%5D=42"),
1182
- ).toBeTrue();
1183
- });
1184
- });
1185
-
1186
1068
  it("allows aborting a request with a Promise", async function () {
1187
1069
  const timeout = $q.defer();
1188
1070
  $http
@@ -79,21 +79,19 @@ describe("$templateRequest", () => {
79
79
  },
80
80
  ]);
81
81
 
82
- createInjector(["test"]).invoke(
83
- ($templateRequest, $http) => {
84
- spyOn($http, "get").and.callThrough();
82
+ createInjector(["test"]).invoke(($templateRequest, $http) => {
83
+ spyOn($http, "get").and.callThrough();
85
84
 
86
- const customCache = new Map();
87
- httpOptions.cache = customCache;
85
+ const customCache = new Map();
86
+ httpOptions.cache = customCache;
88
87
 
89
- $templateRequest("tpl.html");
88
+ $templateRequest("tpl.html");
90
89
 
91
- expect($http.get).toHaveBeenCalledOnceWith("tpl.html", {
92
- cache: customCache,
93
- transformResponse: [],
94
- });
95
- },
96
- );
90
+ expect($http.get).toHaveBeenCalledOnceWith("tpl.html", {
91
+ cache: customCache,
92
+ transformResponse: [],
93
+ });
94
+ });
97
95
  });
98
96
  });
99
97
  });
@@ -14,7 +14,7 @@ import {
14
14
  * {@link ng.$http $http}.
15
15
  *
16
16
  */
17
- export function $HttpBackendProvider() {
17
+ export function HttpBackendProvider() {
18
18
  this.$get = [
19
19
  "$browser",
20
20
  /**
@@ -40,7 +40,7 @@ export let LogService = {
40
40
  * @type {LogProvider}
41
41
  * Use the `$logProvider` to configure how the application logs messages
42
42
  */
43
- export class $LogProvider {
43
+ export class LogProvider {
44
44
  constructor() {
45
45
  this.debug = true;
46
46
  }
@@ -1,5 +1,5 @@
1
1
  import { defaultHttpResponseTransform } from "./http/http";
2
- import { extend, isString, isUndefined, minErr } from "../shared/utils";
2
+ import { extend, isString, minErr } from "../shared/utils";
3
3
 
4
4
  var $templateRequestMinErr = minErr("$templateRequest");
5
5
 
@@ -62,7 +62,7 @@ export function TemplateRequestProvider() {
62
62
  /**
63
63
  *
64
64
  * @param {import('../core/exception-handler').ErrorHandler} $exceptionHandler
65
- * @param {*} $templateCache
65
+ * @param {import('../core/cache/cache-factory').TemplateCache} $templateCache
66
66
  * @param {*} $http
67
67
  * @param {*} $q
68
68
  * @param {*} $sce
@@ -77,7 +77,7 @@ export function TemplateRequestProvider() {
77
77
  // resources for keys that already are included in there. This also makes
78
78
  // AngularJS accept any script directive, no matter its name. However, we
79
79
  // still need to unwrap trusted types.
80
- if (!isString(tpl) || isUndefined($templateCache.get(tpl))) {
80
+ if (!isString(tpl) || !$templateCache.has(tpl)) {
81
81
  tpl = $sce.getTrustedResourceUrl(tpl);
82
82
  }
83
83
 
@@ -1,5 +1,5 @@
1
1
  import { isDate, isFunction, isRegExp, isString } from "./utils";
2
- import { all, prop, curry } from "./hof";
2
+ import { all, curry } from "./hof";
3
3
  import { services } from "../router/common/coreservices";
4
4
 
5
5
  export function forEach(obj, cb, thisArg) {
@@ -160,8 +160,7 @@ export function defaults(opts, ...defaultsList) {
160
160
  const defaultVals = Object.assign({}, ...defaultsList.reverse());
161
161
  return Object.assign(defaultVals, pick(opts || {}, Object.keys(defaultVals)));
162
162
  }
163
- /** Reduce function that merges each element of the list into a single object, using extend */
164
- export const mergeR = (memo, item) => Object.assign(memo, item);
163
+
165
164
  /**
166
165
  * Finds the common ancestor path between two states.
167
166
  *
@@ -214,12 +213,7 @@ export function omit(obj, propNames) {
214
213
  .filter((x) => !propNames.includes(x))
215
214
  .reduce((acc, key) => ((acc[key] = obj[key]), acc), {});
216
215
  }
217
- /**
218
- * Maps an array, or object to a property (by name)
219
- */
220
- export function pluck(collection, propName) {
221
- return map(collection, prop(propName));
222
- }
216
+
223
217
  /** Filters an Array or an Object's properties based on a predicate */
224
218
  export function filter(collection, callback) {
225
219
  const arr = Array.isArray(collection),
package/src/shared/hof.js CHANGED
@@ -73,13 +73,7 @@ export function compose() {
73
73
  export function pipe() {
74
74
  return compose.apply(null, [].slice.call(arguments).reverse());
75
75
  }
76
- /**
77
- * Given a property name, returns a function that returns that property from an object
78
- * let obj = { foo: 1, name: "blarg" };
79
- * let getName = prop("name");
80
- * getName(obj) === "blarg"
81
- */
82
- export const prop = (name) => (obj) => obj && obj[name];
76
+
83
77
  /**
84
78
  * Given a property name and a value, returns a function that returns a boolean based on whether
85
79
  * the passed object has a property that matches the value
@@ -96,7 +90,11 @@ export const propEq = curry((name, _val, obj) => obj && obj[name] === _val);
96
90
  * let propNotFound = prop("this.property.doesnt.exist");
97
91
  * propNotFound(obj) === undefined
98
92
  */
99
- export const parse = (name) => pipe.apply(null, name.split(".").map(prop));
93
+ export const parse = (name) =>
94
+ pipe.apply(
95
+ null,
96
+ name.split(".").map((name) => (obj) => obj && obj[name]),
97
+ );
100
98
 
101
99
  /**
102
100
  * Given two functions that return truthy or falsey values, returns a function that returns truthy
package/src/types.js CHANGED
@@ -150,20 +150,6 @@
150
150
  * - An object where keys are string identifiers and values are {@link Controller}
151
151
  */
152
152
 
153
- /**
154
- * @template [S=import('./core/scope/scope').Scope]
155
- * @template {TScope} S - The type of the directive's scope.
156
- *
157
- * @template [T=import('./shared/jqlite/jqlite').JQLite]
158
- * @template {TElement} T - The type of the directive's element.
159
- *
160
- * @template [A=Attributes]
161
- * @template {TAttributes} A - The type of the directive's attributes.
162
- *
163
- * @template [C=Controller]
164
- * @template {TController} C - The type of the directive's controller.
165
- */
166
-
167
153
  /**
168
154
  * Compile function for an AngularJS directive.
169
155
  *
@@ -39,7 +39,7 @@ export function animateCache(): {
39
39
  */
40
40
  put(key: string, value: any, isValid: boolean): void;
41
41
  };
42
- export function $$AnimateCacheProvider(): void;
43
- export class $$AnimateCacheProvider {
42
+ export function AnimateCacheProvider(): void;
43
+ export class AnimateCacheProvider {
44
44
  $get: (typeof animateCache)[];
45
45
  }
@@ -1,12 +1,12 @@
1
- export function $$AnimateCssDriverProvider($$animationProvider: any): void;
2
- export class $$AnimateCssDriverProvider {
1
+ export function AnimateCssDriverProvider($$animationProvider: any): void;
2
+ export class AnimateCssDriverProvider {
3
3
  constructor($$animationProvider: any);
4
4
  /**
5
5
  * @returns {Function}
6
6
  */
7
7
  $get: (string | (($animateCss: any, $$AnimateRunner: typeof import("./animate-runner").AnimateRunner, $rootElement: JQLite) => (animationDetails: any) => any))[];
8
8
  }
9
- export namespace $$AnimateCssDriverProvider {
9
+ export namespace AnimateCssDriverProvider {
10
10
  let $inject: string[];
11
11
  }
12
12
  import { JQLite } from "../shared/jqlite/jqlite";
@@ -1,5 +1,5 @@
1
- export function $AnimateCssProvider(): void;
2
- export class $AnimateCssProvider {
1
+ export function AnimateCssProvider(): void;
2
+ export class AnimateCssProvider {
3
3
  $get: (string | (($$AnimateRunner: any, $timeout: any, $$animateCache: any, $$rAFScheduler: import("./raf-scheduler").RafScheduler, $$animateQueue: any) => (element: any, initialOptions: any) => {
4
4
  $$willAnimate: boolean;
5
5
  start(): any;
@@ -1,8 +1,8 @@
1
- export function $$AnimateJsDriverProvider($$animationProvider: any): void;
2
- export class $$AnimateJsDriverProvider {
1
+ export function AnimateJsDriverProvider($$animationProvider: any): void;
2
+ export class AnimateJsDriverProvider {
3
3
  constructor($$animationProvider: any);
4
4
  $get: (string | (($$animateJs: any, $$AnimateRunner: any) => (animationDetails: any) => any))[];
5
5
  }
6
- export namespace $$AnimateJsDriverProvider {
6
+ export namespace AnimateJsDriverProvider {
7
7
  let $inject: string[];
8
8
  }
@@ -1,5 +1,5 @@
1
- export function $$AnimateJsProvider($animateProvider: any): void;
2
- export class $$AnimateJsProvider {
1
+ export function AnimateJsProvider($animateProvider: any): void;
2
+ export class AnimateJsProvider {
3
3
  constructor($animateProvider: any);
4
4
  $get: (string | (($injector: import("../core/di/internal-injector").InjectorService, $$AnimateRunner: any) => (element: any, event: any, classes: any, options: any, ...args: any[]) => {
5
5
  $$willAnimate: boolean;
@@ -7,6 +7,6 @@ export class $$AnimateJsProvider {
7
7
  start(): any;
8
8
  }))[];
9
9
  }
10
- export namespace $$AnimateJsProvider {
10
+ export namespace AnimateJsProvider {
11
11
  let $inject: string[];
12
12
  }
@@ -1,5 +1,5 @@
1
- export function $$AnimateQueueProvider($animateProvider: any): void;
2
- export class $$AnimateQueueProvider {
1
+ export function AnimateQueueProvider($animateProvider: any): void;
2
+ export class AnimateQueueProvider {
3
3
  constructor($animateProvider: any);
4
4
  rules: {
5
5
  skip: any[];
@@ -14,6 +14,6 @@ export class $$AnimateQueueProvider {
14
14
  enabled(element: any, bool: any, ...args: any[]): any;
15
15
  }))[];
16
16
  }
17
- export namespace $$AnimateQueueProvider {
17
+ export namespace AnimateQueueProvider {
18
18
  let $inject: string[];
19
19
  }
@@ -1,5 +1,5 @@
1
- export function $$AnimationProvider(): void;
2
- export class $$AnimationProvider {
1
+ export function AnimationProvider(): void;
2
+ export class AnimationProvider {
3
3
  drivers: any[];
4
4
  $get: (string | (($rootScope: any, $injector: import("../core/di/internal-injector").InjectorService, $$AnimateRunner: any, $$rAFScheduler: import("./raf-scheduler").RafScheduler, $$animateCache: any) => (element: any, event: any, options: any) => any))[];
5
5
  }
@@ -1,4 +1,22 @@
1
- export function TemplateCacheProvider(): void;
1
+ /**
2
+ * A cache for maping template names to their respective content.
3
+ *
4
+ * @typedef {Map<string, string>} TemplateCache
5
+ */
6
+ /**
7
+ * Service responsible for providing a cache for templates.
8
+ *
9
+ * @class TemplateCacheProvider
10
+ * @description Provides an instance of a template cache that can be used to store and retrieve template content.
11
+ */
2
12
  export class TemplateCacheProvider {
3
- $get: () => Map<any, any>;
13
+ /**
14
+ * @description Returns a new instance of a `TemplateCache`, which is a Map used to store templates.
15
+ * @returns {TemplateCache} A new instance of the template cache (Map object).
16
+ */
17
+ $get: () => TemplateCache;
4
18
  }
19
+ /**
20
+ * A cache for maping template names to their respective content.
21
+ */
22
+ export type TemplateCache = Map<string, string>;
@@ -17,7 +17,7 @@ export class Attributes {
17
17
  constructor($rootScope: import("../scope/scope").Scope, $animate: any, $exceptionHandler: import("../exception-handler").ExceptionHandlerProvider, $sce: any, element?: import("../../shared/jqlite/jqlite").JQLite, attributesToCopy?: any);
18
18
  $rootScope: import("../scope/scope").Scope;
19
19
  $animate: any;
20
- $exceptionHandler: any;
20
+ $exceptionHandler: import("../exception-handler").ExceptionHandlerProvider;
21
21
  $sce: any;
22
22
  $attr: {};
23
23
  $$element: import("../../shared/jqlite/jqlite").JQLite;
@@ -1,5 +1,5 @@
1
- export function $CompileProvider($provide: any, $$sanitizeUriProvider: any): void;
2
- export class $CompileProvider {
1
+ export function CompileProvider($provide: any, $$sanitizeUriProvider: any): void;
2
+ export class CompileProvider {
3
3
  constructor($provide: any, $$sanitizeUriProvider: any);
4
4
  /**
5
5
  * Register a new directive with the compiler.
@@ -9,9 +9,9 @@ export class $CompileProvider {
9
9
  * are the factories.
10
10
  * @param {Function|Array} directiveFactory An injectable directive factory function. See the
11
11
  * {@link guide/directive directive guide} and the {@link $compile compile API} for more info.
12
- * @returns {$CompileProvider} Self for chaining.
12
+ * @returns {CompileProvider} Self for chaining.
13
13
  */
14
- directive: (name: string | any, directiveFactory: Function | any[]) => $CompileProvider;
14
+ directive: (name: string | any, directiveFactory: Function | any[]) => CompileProvider;
15
15
  /**
16
16
  * @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
17
17
  * or an object map of components where the keys are the names and the values are the component definition objects.
@@ -54,9 +54,9 @@ export class $CompileProvider {
54
54
  * - `$...` – additional properties to attach to the directive factory function and the controller
55
55
  * constructor function. (This is used by the component router to annotate)
56
56
  *
57
- * @returns {$CompileProvider} the compile provider itself, for chaining of function calls.
57
+ * @returns {CompileProvider} the compile provider itself, for chaining of function calls.
58
58
  */
59
- component: (name: string | any, options: any) => $CompileProvider;
59
+ component: (name: string | any, options: any) => CompileProvider;
60
60
  /**
61
61
  * Retrieves or overrides the default regular expression that is used for determining trusted safe
62
62
  * urls during a[href] sanitization.
@@ -69,10 +69,10 @@ export class $CompileProvider {
69
69
  * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
70
70
  *
71
71
  * @param {RegExp=} regexp New regexp to trust urls with.
72
- * @returns {RegExp|$CompileProvider} Current RegExp if called without value or self for
72
+ * @returns {RegExp|CompileProvider} Current RegExp if called without value or self for
73
73
  * chaining otherwise.
74
74
  */
75
- aHrefSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | $CompileProvider;
75
+ aHrefSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | CompileProvider;
76
76
  /**
77
77
  * Retrieves or overrides the default regular expression that is used for determining trusted safe
78
78
  * urls during img[src] sanitization.
@@ -85,10 +85,10 @@ export class $CompileProvider {
85
85
  * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
86
86
  *
87
87
  * @param {RegExp=} regexp New regexp to trust urls with.
88
- * @returns {RegExp|$CompileProvider} Current RegExp if called without value or self for
88
+ * @returns {RegExp|CompileProvider} Current RegExp if called without value or self for
89
89
  * chaining otherwise.
90
90
  */
91
- imgSrcSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | $CompileProvider;
91
+ imgSrcSanitizationTrustedUrlList: (regexp?: RegExp | undefined) => RegExp | CompileProvider;
92
92
  strictComponentBindingsEnabled: (enabled: any) => boolean | this;
93
93
  /**
94
94
  * Defines the security context for DOM properties bound by ng-prop-*.
@@ -101,7 +101,7 @@ export class $CompileProvider {
101
101
  addPropertySecurityContext: (elementName: string, propertyName: string, ctx: string) => object;
102
102
  $get: (string | (($injector: import("../../core/di/internal-injector").InjectorService, $interpolate: any, $exceptionHandler: import("../exception-handler").ExceptionHandlerProvider, $templateRequest: any, $parse: import("../parser/parse").ParseService, $controller: any, $rootScope: import("../scope/scope").Scope, $sce: any, $animate: any) => ($compileNodes: string | NodeList, transcludeFn: any, maxPriority: any, ignoreDirective: any, previousCompileContext: any) => (scope: any, cloneConnectFn: any, options: any) => JQLite))[];
103
103
  }
104
- export namespace $CompileProvider {
104
+ export namespace CompileProvider {
105
105
  let $inject: string[];
106
106
  }
107
107
  /**
@@ -6,7 +6,7 @@ export function identifierForController(controller: any, ident: any): any;
6
6
  * This provider allows controller registration via the
7
7
  * {@link ng.$controllerProvider#register register} method.
8
8
  */
9
- export class $ControllerProvider {
9
+ export class ControllerProvider {
10
10
  /**
11
11
  * @type {Map<string, Function|Object>}
12
12
  * @private
@@ -2,10 +2,9 @@
2
2
  * @constructor
3
3
  * @this {ExceptionHandlerProvider}
4
4
  */
5
- export function $ExceptionHandlerProvider(this: any): void;
6
- export class $ExceptionHandlerProvider {
5
+ export function ExceptionHandlerProvider(this: ExceptionHandlerProvider): void;
6
+ export class ExceptionHandlerProvider {
7
7
  $get: (string | (($log: import("../services/log").LogService) => ErrorHandler))[];
8
8
  }
9
9
  export function errorHandler(exception: any, cause: any): void;
10
- export type ExceptionHandlerProvider = import("../types").ServiceProvider;
11
10
  export type ErrorHandler = (exception: Error, cause?: string) => void;
@@ -1,9 +1,9 @@
1
- export function $FilterProvider($provide: any): void;
2
- export class $FilterProvider {
1
+ export function FilterProvider($provide: any): void;
2
+ export class FilterProvider {
3
3
  constructor($provide: any);
4
4
  register: (name: any, factory: any) => any;
5
5
  $get: (string | (($injector: import("../../core/di/internal-injector").InjectorService) => (name: any) => any))[];
6
6
  }
7
- export namespace $FilterProvider {
7
+ export namespace FilterProvider {
8
8
  let $inject: string[];
9
9
  }