@types/k6 0.47.3 → 0.49.0

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.
k6/options.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  /*
2
2
  * Program options.
3
- * https://k6.io/docs/using-k6/options/
3
+ * https://grafana.com/docs/k6/latest/using-k6/k6-options/
4
4
  */
5
5
 
6
6
  import { CipherSuite } from "./http";
7
7
 
8
8
  /**
9
9
  * Program options.
10
- * https://k6.io/docs/using-k6/options/
10
+ * https://grafana.com/docs/k6/latest/using-k6/k6-options/
11
11
  */
12
12
  export interface Options {
13
13
  /** Maximum parallel `http.batch()` connections per VU. */
@@ -25,7 +25,7 @@ export interface Options {
25
25
  /** Discard response bodies. */
26
26
  discardResponseBodies?: boolean;
27
27
 
28
- /** DNS resolution behavior. https://k6.io/docs/using-k6/options#dns */
28
+ /** DNS resolution behavior. https://grafana.com/docs/k6/latest/using-k6/k6-options#dns */
29
29
  dns?: {
30
30
  /** 0, inf, or any time duration(60s, 5m30s, 10m, 2h). */
31
31
  ttl: string;
@@ -38,10 +38,10 @@ export interface Options {
38
38
  /** Test duration. */
39
39
  duration?: string;
40
40
 
41
- /** Partition the test run in different segments. https://k6.io/docs/using-k6/options#execution-segment */
41
+ /** Partition the test run in different segments. https://grafana.com/docs/k6/latest/using-k6/k6-options#execution-segment */
42
42
  executionSegment?: string;
43
43
 
44
- /** Define the sequence segment to run. https://k6.io/docs/using-k6/options#execution-segment */
44
+ /** Define the sequence segment to run. https://grafana.com/docs/k6/latest/using-k6/k6-options#execution-segment */
45
45
  executionSegmentSequence?: string;
46
46
 
47
47
  /** Third party collector configuration. */
@@ -152,13 +152,13 @@ export interface Stage {
152
152
 
153
153
  /**
154
154
  * Threshold specification.
155
- * https://k6.io/docs/using-k6/thresholds/
155
+ * https://grafana.com/docs/k6/latest/using-k6/thresholds/
156
156
  */
157
157
  export type Threshold = string | ObjectThreshold;
158
158
 
159
159
  /**
160
160
  * Object form threshold specification.
161
- * https://k6.io/docs/using-k6/thresholds/
161
+ * https://grafana.com/docs/k6/latest/using-k6/thresholds/
162
162
  */
163
163
  export interface ObjectThreshold {
164
164
  /** Abort test if threshold violated. */
@@ -200,7 +200,7 @@ export type ExecutorOptions =
200
200
  /**
201
201
  * BaseScenario.
202
202
  *
203
- * https://k6.io/docs/using-k6/scenarios/
203
+ * https://grafana.com/docs/k6/latest/using-k6/scenarios/
204
204
  */
205
205
  export abstract class BaseScenario {
206
206
  /**
@@ -224,7 +224,7 @@ export abstract class BaseScenario {
224
224
 
225
225
  /**
226
226
  * Time to wait for iterations to finish executing before stopping them forcefully.
227
- * See https://k6.io/docs/using-k6/scenarios#graceful-stop-and-ramp-down/
227
+ * See https://grafana.com/docs/k6/latest/using-k6/scenarios#graceful-stop-and-ramp-down/
228
228
  *
229
229
  * Default value is 30s
230
230
  */
@@ -250,7 +250,7 @@ export abstract class BaseScenario {
250
250
  /**
251
251
  * A fixed amount of iterations are shared between a number of VUs.
252
252
  *
253
- * https://k6.io/docs/using-k6/scenarios/executors/shared-iterations/
253
+ * https://grafana.com/docs/k6/latest/using-k6/scenarios/executors/shared-iterations/
254
254
  */
255
255
  export interface SharedIterationsScenario extends BaseScenario {
256
256
  executor: "shared-iterations";
@@ -279,7 +279,7 @@ export interface SharedIterationsScenario extends BaseScenario {
279
279
  /**
280
280
  * Each VU executes an exact number of iterations.
281
281
  *
282
- * https://k6.io/docs/using-k6/scenarios/executors/per-vu-iterations/
282
+ * https://grafana.com/docs/k6/latest/using-k6/scenarios/executors/per-vu-iterations/
283
283
  */
284
284
  export interface PerVUIterationsScenario extends BaseScenario {
285
285
  executor: "per-vu-iterations";
@@ -308,7 +308,7 @@ export interface PerVUIterationsScenario extends BaseScenario {
308
308
  /**
309
309
  * A fixed number of VUs execute as many iterations as possible for a specified amount of time.
310
310
  *
311
- * https://k6.io/docs/using-k6/scenarios/executors/constant-vus/
311
+ * https://grafana.com/docs/k6/latest/using-k6/scenarios/executors/constant-vus/
312
312
  */
313
313
  export interface ConstantVUsScenario extends BaseScenario {
314
314
  executor: "constant-vus";
@@ -329,7 +329,7 @@ export interface ConstantVUsScenario extends BaseScenario {
329
329
  /**
330
330
  * A variable number of VUs execute as many iterations as possible for a specified amount of time.
331
331
  *
332
- * https://k6.io/docs/using-k6/scenarios/executors/ramping-vus/
332
+ * https://grafana.com/docs/k6/latest/using-k6/scenarios/executors/ramping-vus/
333
333
  */
334
334
  export interface RampingVUsScenario extends BaseScenario {
335
335
  executor: "ramping-vus";
@@ -355,7 +355,7 @@ export interface RampingVUsScenario extends BaseScenario {
355
355
  /**
356
356
  * A fixed number of iterations are executed in a specified period of time.
357
357
  *
358
- * https://k6.io/docs/using-k6/scenarios/executors/constant-arrival-rate/
358
+ * https://grafana.com/docs/k6/latest/using-k6/scenarios/executors/constant-arrival-rate/
359
359
  */
360
360
  export interface ConstantArrivalRateScenario extends BaseScenario {
361
361
  executor: "constant-arrival-rate";
@@ -387,7 +387,7 @@ export interface ConstantArrivalRateScenario extends BaseScenario {
387
387
  /**
388
388
  * A variable number of iterations are executed in a specified period of time.
389
389
  *
390
- * https://k6.io/docs/using-k6/scenarios/executors/ramping-arrival-rate/
390
+ * https://grafana.com/docs/k6/latest/using-k6/scenarios/executors/ramping-arrival-rate/
391
391
  */
392
392
  export interface RampingArrivalRateScenario extends BaseScenario {
393
393
  executor: "ramping-arrival-rate";
@@ -415,7 +415,7 @@ export interface RampingArrivalRateScenario extends BaseScenario {
415
415
  /**
416
416
  * Control and scale execution at runtime via k6's REST API or the CLI.
417
417
  *
418
- * https://k6.io/docs/using-k6/scenarios/executors/externally-controlled/
418
+ * https://grafana.com/docs/k6/latest/using-k6/scenarios/executors/externally-controlled/
419
419
  */
420
420
  export interface ExternallyControlledScenario extends BaseScenario {
421
421
  executor: "externally-controlled";
k6/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/k6",
3
- "version": "0.47.3",
3
+ "version": "0.49.0",
4
4
  "description": "TypeScript definitions for k6",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6",
6
6
  "license": "MIT",
@@ -49,6 +49,11 @@
49
49
  "name": "Daniel Jiménez",
50
50
  "githubUsername": "ka3de",
51
51
  "url": "https://github.com/ka3de"
52
+ },
53
+ {
54
+ "name": "Joan López de la Franca Beltran",
55
+ "githubUsername": "joanlopez",
56
+ "url": "https://github.com/joanlopez"
52
57
  }
53
58
  ],
54
59
  "main": "",
@@ -60,6 +65,6 @@
60
65
  },
61
66
  "scripts": {},
62
67
  "dependencies": {},
63
- "typesPublisherContentHash": "29d8cb3515608ff666bebafd6f058aceff34cbc16d198ff17fe87b47a45346e0",
64
- "typeScriptVersion": "4.5"
68
+ "typesPublisherContentHash": "0d8d2b1f53185323eb5e05154ba6e59b216bf4cb81d3074f93b14aa093219244",
69
+ "typeScriptVersion": "4.6"
65
70
  }
k6/ws.d.ts CHANGED
@@ -2,7 +2,7 @@ import { CookieJar } from "./http";
2
2
 
3
3
  /**
4
4
  * Open WebSocket connection.
5
- * https://k6.io/docs/javascript-api/k6-ws/connect-url-params-callback/
5
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-ws/connect/
6
6
  * @param url - Request URL.
7
7
  * @param callback - Logic to execute with socket.
8
8
  * @returns HTTP response to connection request.
@@ -18,7 +18,7 @@ export function connect(url: string, callback: Executor): Response;
18
18
 
19
19
  /**
20
20
  * Open WebSocket connection.
21
- * https://k6.io/docs/javascript-api/k6-ws/connect-url-params-callback/
21
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-ws/connect/
22
22
  * @param url - Request URL.
23
23
  * @param params - Request parameters.
24
24
  * @param callback - Logic to execute with socket.
@@ -95,14 +95,14 @@ export interface Response {
95
95
 
96
96
  /**
97
97
  * Created socket.
98
- * https://k6.io/docs/javascript-api/k6-ws/socket/
98
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-ws/socket/
99
99
  */
100
100
  export abstract class Socket {
101
101
  protected __brand: never;
102
102
 
103
103
  /**
104
104
  * Close connection.
105
- * https://k6.io/docs/javascript-api/k6-ws/socket/socket-close/
105
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-ws/socket/socket-close/
106
106
  * @param code - WebSocket status code.
107
107
  * @example
108
108
  * socket.close();
@@ -111,7 +111,7 @@ export abstract class Socket {
111
111
 
112
112
  /**
113
113
  * Listen to event.
114
- * https://k6.io/docs/javascript-api/k6-ws/socket/socket-on-event-callback/
114
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-ws/socket/socket-on/
115
115
  * @param event - Event type.
116
116
  * @param handler - Event handler.
117
117
  * @example
@@ -126,7 +126,7 @@ export abstract class Socket {
126
126
 
127
127
  /**
128
128
  * Send ping.
129
- * https://k6.io/docs/javascript-api/k6-ws/socket/socket-ping/
129
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-ws/socket/socket-ping/
130
130
  * @example
131
131
  * socket.ping();
132
132
  */
@@ -134,7 +134,7 @@ export abstract class Socket {
134
134
 
135
135
  /**
136
136
  * Send data.
137
- * https://k6.io/docs/javascript-api/k6-ws/socket/socket-send-data/
137
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-ws/socket/socket-send/
138
138
  * @param data - Data to send.
139
139
  * @example
140
140
  * socket.send(JSON.stringify({ data: 'hola' }));
@@ -162,7 +162,7 @@ export abstract class Socket {
162
162
 
163
163
  /**
164
164
  * Call a function repeatedly, while the WebSocket connection is open.
165
- * https://k6.io/docs/javascript-api/k6-ws/socket/socket-setinterval-callback-interval/
165
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-ws/socket/socket-setinterval/
166
166
  * @param handler - The function to call every `interval` milliseconds.
167
167
  * @param interval - Milliseconds between two calls to `callback`.
168
168
  * @example
@@ -176,7 +176,7 @@ export abstract class Socket {
176
176
  /**
177
177
  * Call a function at a later time,
178
178
  * if the WebSocket connection is still open then.
179
- * https://k6.io/docs/javascript-api/k6-ws/socket/socket-settimeout-callback-delay/
179
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-ws/socket/socket-settimeout/
180
180
  * @param handler - The function to call when `delay` has expired.
181
181
  * @param delay - Delay in milliseconds.
182
182
  * @example
@@ -282,12 +282,12 @@ export abstract class WebSocketError {
282
282
 
283
283
  /**
284
284
  * This module provides a WebSocket client implementing the WebSocket protocol.
285
- * https://k6.io/docs/javascript-api/k6-ws/
285
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-ws/
286
286
  */
287
287
  declare namespace ws {
288
288
  /**
289
289
  * Open WebSocket connection.
290
- * https://k6.io/docs/javascript-api/k6-ws/connect-url-params-callback/
290
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-ws/connect/
291
291
  * @param url - Request URL.
292
292
  * @param callback - Logic to execute with socket.
293
293
  * @returns HTTP response to connection request.
@@ -303,7 +303,7 @@ declare namespace ws {
303
303
 
304
304
  /**
305
305
  * Open WebSocket connection.
306
- * https://k6.io/docs/javascript-api/k6-ws/connect-url-params-callback/
306
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-ws/connect/
307
307
  * @param url - Request URL.
308
308
  * @param params - Request parameters.
309
309
  * @param callback - Logic to execute with socket.