@kronos-integration/interceptor 13.0.4 → 13.0.6

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.
package/README.md CHANGED
@@ -72,7 +72,7 @@ Calls configure() and reset().
72
72
 
73
73
  ### Parameters
74
74
 
75
- * `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** The interceptor configuration object.
75
+ * `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
76
76
 
77
77
  ### type
78
78
 
@@ -167,7 +167,7 @@ default is to reject when more than 10 requests are on the way
167
167
 
168
168
  ### Parameters
169
169
 
170
- * `config`  
170
+ * `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
171
171
 
172
172
  ### name
173
173
 
@@ -234,7 +234,7 @@ Rejects promise when it is not resolved within given timeout.
234
234
 
235
235
  ### Parameters
236
236
 
237
- * `promise` **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)** 
237
+ * `promise` **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<any>**&#x20;
238
238
  * `timeout` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** in miliseconds
239
239
  * `source` **[Interceptor](#interceptor)**&#x20;
240
240
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kronos-integration/interceptor",
3
- "version": "13.0.4",
3
+ "version": "13.0.6",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -39,7 +39,7 @@
39
39
  "lint:typescript": "tsc --allowJs --checkJs --noEmit --resolveJsonModule --target es2024 --lib es2024 -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
40
40
  },
41
41
  "dependencies": {
42
- "pacc": "^5.0.0"
42
+ "pacc": "^5.1.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@kronos-integration/test-interceptor": "^7.0.32",
@@ -16,6 +16,10 @@ export class Interceptor {
16
16
  */
17
17
  static attributes = {};
18
18
 
19
+ /**
20
+ *
21
+ * @param {Object?} config
22
+ */
19
23
  constructor(config) {
20
24
  this.configure(config);
21
25
  this.reset();
@@ -47,9 +47,13 @@ export class LimitingInterceptor extends Interceptor {
47
47
  Interceptor.attributes
48
48
  );
49
49
 
50
+ /**
51
+ *
52
+ * @param {Object?} config
53
+ */
50
54
  constructor(config) {
51
55
  super(config);
52
- this.limits = config?.limits || this.constructor.attributes.limits.default;
56
+ this.limits = config?.limits || this.attributes.limits.default;
53
57
  }
54
58
 
55
59
  toJSON() {
@@ -32,7 +32,7 @@ export class TimeoutInterceptor extends Interceptor {
32
32
 
33
33
  /**
34
34
  * Rejects promise when it is not resolved within given timeout.
35
- * @param {Promise} promise
35
+ * @param {Promise<any>} promise
36
36
  * @param {number} timeout in miliseconds
37
37
  * @param {Interceptor} source
38
38
  * @return {Promise<any>}
@@ -12,7 +12,11 @@ export class Interceptor {
12
12
  * @return {Object}
13
13
  */
14
14
  static attributes: {};
15
- constructor(config: any);
15
+ /**
16
+ *
17
+ * @param {Object?} config
18
+ */
19
+ constructor(config: any | null);
16
20
  /**
17
21
  * The instance method returning the type.
18
22
  * Defaults to the constructors name (class name)