@types/k6 0.47.3 → 0.48.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/http.d.ts CHANGED
@@ -3,7 +3,7 @@ import { Selection } from "./html";
3
3
 
4
4
  /**
5
5
  * Make DELETE request.
6
- * https://k6.io/docs/javascript-api/k6-http/del-url-body-params
6
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/del/
7
7
  * @param url - Request URL.
8
8
  * @param body - Discouraged. Request body. Object form encoded.
9
9
  * @param params - Request parameters.
@@ -17,7 +17,7 @@ export function del<RT extends ResponseType | undefined>(
17
17
 
18
18
  /**
19
19
  * Make HEAD request.
20
- * https://k6.io/docs/javascript-api/k6-http/head-url-params/
20
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/head/
21
21
  * @param url - Request URL.
22
22
  * @param params - Request parameters.
23
23
  * @returns Resulting response.
@@ -31,7 +31,7 @@ export function head<RT extends ResponseType | undefined>(
31
31
 
32
32
  /**
33
33
  * Make GET request.
34
- * https://k6.io/docs/javascript-api/k6-http/get-url-params
34
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/get/
35
35
  * @param url - Request URL.
36
36
  * @param params - Request parameters.
37
37
  * @returns Resulting response.
@@ -45,7 +45,7 @@ export function get<RT extends ResponseType | undefined>(
45
45
 
46
46
  /**
47
47
  * Make OPTIONS request.
48
- * https://k6.io/docs/javascript-api/k6-http/options-url-body-params
48
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/options/
49
49
  * @param url - Request URL.
50
50
  * @param body - Request body. Object form encoded.
51
51
  * @param params - Request parameters.
@@ -59,7 +59,7 @@ export function options<RT extends ResponseType | undefined>(
59
59
 
60
60
  /**
61
61
  * Make PATCH request.
62
- * https://k6.io/docs/javascript-api/k6-http/patch-url-body-params
62
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/patch/
63
63
  * @param url - Request URL.
64
64
  * @param body - Request body. Object form encoded.
65
65
  * @param params - Request parameters.
@@ -73,7 +73,7 @@ export function patch<RT extends ResponseType | undefined>(
73
73
 
74
74
  /**
75
75
  * Make POST request.
76
- * https://k6.io/docs/javascript-api/k6-http/post-url-body-params
76
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/post/
77
77
  * @param url - Request URL.
78
78
  * @param body - Request body. Object form encoded.
79
79
  * @param params - Request parameters.
@@ -91,7 +91,7 @@ export function post<RT extends ResponseType | undefined>(
91
91
 
92
92
  /**
93
93
  * Make PUT request.
94
- * https://k6.io/docs/javascript-api/k6-http/put-url-body-params
94
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/put/
95
95
  * @param url - Request URL.
96
96
  * @param body - Request body. Object form encoded.
97
97
  * @param params - Request parameters.
@@ -105,7 +105,7 @@ export function put<RT extends ResponseType | undefined>(
105
105
 
106
106
  /**
107
107
  * Make request.
108
- * https://k6.io/docs/javascript-api/k6-http/request-method-url-body-params
108
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/request/
109
109
  * @param method - HTTP method.
110
110
  * @param url - Request URL.
111
111
  * @param body - Request body. Object form encoded.
@@ -125,7 +125,7 @@ export function request<RT extends ResponseType | undefined>(
125
125
 
126
126
  /**
127
127
  * Make async request.
128
- * https://k6.io/docs/javascript-api/k6-http/asyncrequest/
128
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/asyncrequest/
129
129
  * @param method - HTTP method.
130
130
  * @param url - Request URL.
131
131
  * @param body - Request body. Object form encoded.
@@ -146,7 +146,7 @@ export function asyncRequest<RT extends ResponseType | undefined>(
146
146
  /**
147
147
  * Batch multiple HTTP requests together,
148
148
  * to issue them in parallel over multiple TCP connections.
149
- * https://k6.io/docs/javascript-api/k6-http/batch-requests
149
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/batch/
150
150
  * @param requests - Request specifications.
151
151
  * @returns Resulting responses.
152
152
  * @example
@@ -170,7 +170,7 @@ export function batch<Q extends BatchRequests>(requests: Q): BatchResponses<Q>;
170
170
 
171
171
  /**
172
172
  * Create a file object used for building multipart requests (file uploads).
173
- * https://k6.io/docs/javascript-api/k6-http/file-data-filename-contenttype
173
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/file/
174
174
  * @param data - File data.
175
175
  * @param filename - Filename. Included in MIME message.
176
176
  * @param contentType - Content type. Included in MIME message.
@@ -189,7 +189,7 @@ export function file(data: string | bytes | ArrayBuffer, filename?: string, cont
189
189
 
190
190
  /**
191
191
  * Get active cookie jar.
192
- * https://k6.io/docs/javascript-api/k6-http/cookiejar
192
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/cookiejar
193
193
  * @returns Active cookie jar.
194
194
  * @example
195
195
  * let jar = http.cookieJar();
@@ -205,7 +205,7 @@ export function expectedStatuses(...param: Array<number | ExpectedStatusesObject
205
205
 
206
206
  /**
207
207
  * Set the response callback to be called to determine if a response was expected/successful or not.
208
- * https://k6.io/docs/javascript-api/k6-http/setresponsecallback-callback
208
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/setresponsecallback/
209
209
  */
210
210
  export function setResponseCallback(responseCallback: ExpectedStatusesCallback): void;
211
211
 
@@ -261,7 +261,7 @@ export const OCSP_REASON_UNSPECIFIED = "unspecified";
261
261
 
262
262
  /**
263
263
  * Request parameters.
264
- * https://k6.io/docs/javascript-api/k6-http/params-k6-http
264
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/params/
265
265
  */
266
266
  export interface Params {
267
267
  /** Authentication method. */
@@ -315,7 +315,7 @@ export type ResponseType = "binary" | "none" | "text";
315
315
 
316
316
  /**
317
317
  * Cookie value in request parameters.
318
- * https://k6.io/docs/javascript-api/k6-http/params-k6-http
318
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/params/
319
319
  */
320
320
  export type ParamsCookieValue = string | { value?: string; replace?: boolean };
321
321
 
@@ -339,7 +339,7 @@ export interface StructuredRequestBody {
339
339
 
340
340
  /**
341
341
  * Batch request specification.
342
- * https://k6.io/docs/javascript-api/k6-http/batch-requests
342
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/batch/
343
343
  */
344
344
  export type BatchRequest = string | HttpURL | ArrayBatchRequest | ObjectBatchRequest;
345
345
 
@@ -418,7 +418,7 @@ export type BatchResponses<Q> = {
418
418
 
419
419
  /**
420
420
  * Response.
421
- * https://k6.io/docs/javascript-api/k6-http/response-k6-http
421
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/response/
422
422
  */
423
423
  export interface Response {
424
424
  /** Response body. */
@@ -525,7 +525,7 @@ export interface Response {
525
525
 
526
526
  /**
527
527
  * Click link on page.
528
- * https://k6.io/docs/javascript-api/k6-http/response-k6-http/response-clicklink-params
528
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/response/response-clicklink/
529
529
  * @param selector - Selector expression locating link to click.
530
530
  * @param params - Parameters for link click request.
531
531
  * @returns Link click response.
@@ -537,7 +537,7 @@ export interface Response {
537
537
 
538
538
  /**
539
539
  * Parse body as HTML. Optionally filter by selector.
540
- * https://k6.io/docs/javascript-api/k6-http/response/response-html
540
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/response/response-html
541
541
  * @param selector - Selector expression.
542
542
  * @returns Document node or selected elements.
543
543
  * @example
@@ -548,7 +548,7 @@ export interface Response {
548
548
 
549
549
  /**
550
550
  * Parse body as JSON. Optionally filter by selector.
551
- * https://k6.io/docs/javascript-api/k6-http/response/response-json-selector
551
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/response/response-json/
552
552
  * @param selector - GJSON expression.
553
553
  * @returns Parse result if successful, `undefined` if unsuccessful.
554
554
  * @example
@@ -559,7 +559,7 @@ export interface Response {
559
559
 
560
560
  /**
561
561
  * Submit form on page.
562
- * https://k6.io/docs/javascript-api/k6-http/response-k6-http/response-submitform-params
562
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/response/response-submitform/
563
563
  * @param formSelector - Selector expression locating form to submit.
564
564
  * @param fields - Form field values.
565
565
  * @param submitSelector - Selector expression locating submit button.
@@ -682,7 +682,7 @@ export interface ResponseCookie {
682
682
 
683
683
  /**
684
684
  * File data for constructing a multipart request with file uploads.
685
- * https://k6.io/docs/javascript-api/k6-http/filedata-k6-http
685
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/filedata/
686
686
  */
687
687
  export abstract class FileData {
688
688
  protected __brand: never;
@@ -702,14 +702,14 @@ export abstract class FileData {
702
702
 
703
703
  /**
704
704
  * Object for storing cookies.
705
- * https://k6.io/docs/javascript-api/k6-http/cookiejar/
705
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/cookiejar/
706
706
  */
707
707
  export class CookieJar {
708
708
  protected __brand: never;
709
709
 
710
710
  /**
711
711
  * Get cookies set for a particular URL.
712
- * https://k6.io/docs/javascript-api/k6-http/cookiejar-k6-http/cookiejar-cookiesforurl-url/
712
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/cookiejar/cookiejar-cookiesforurl/
713
713
  * @param url - URL for which to get cookies.
714
714
  * @returns Cookies for URL.
715
715
  */
@@ -717,7 +717,7 @@ export class CookieJar {
717
717
 
718
718
  /**
719
719
  * Set cookie.
720
- * https://k6.io/docs/javascript-api/k6-http/cookiejar-k6-http/cookiejar-set-name-value-options/
720
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/cookiejar/cookiejar-set/
721
721
  * @param url - Cookie URL.
722
722
  * @param name - Cookie name.
723
723
  * @param value - Cookie value.
@@ -727,7 +727,7 @@ export class CookieJar {
727
727
 
728
728
  /**
729
729
  * Delete all cookies for the given URL.
730
- * https://k6.io/docs/javascript-api/k6-http/cookiejar/cookiejar-clear
730
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/cookiejar/cookiejar-clear
731
731
  * @param url - URL to delete all cookies for.
732
732
  */
733
733
 
@@ -735,7 +735,7 @@ export class CookieJar {
735
735
 
736
736
  /**
737
737
  * Deletes specific cookie by name for the given URL.
738
- * https://k6.io/docs/javascript-api/k6-http/cookiejar/cookiejar-delete/
738
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/cookiejar/cookiejar-delete/
739
739
  * @param url - URL to delete cookie for.
740
740
  * @param name - Cookie name to delete.
741
741
  */
@@ -794,12 +794,12 @@ interface HttpURL {
794
794
 
795
795
  /**
796
796
  * The http module contains functionality for performing HTTP transactions.
797
- * https://k6.io/docs/javascript-api/k6-http/
797
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/
798
798
  */
799
799
  declare namespace http {
800
800
  /**
801
801
  * Make DELETE request.
802
- * https://k6.io/docs/javascript-api/k6-http/del-url-body-params/
802
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/del/
803
803
  * @param url - Request URL.
804
804
  * @param body - Discouraged. Request body. Object form encoded.
805
805
  * @param params - Request parameters.
@@ -813,7 +813,7 @@ declare namespace http {
813
813
 
814
814
  /**
815
815
  * Make HEAD request.
816
- * https://k6.io/docs/javascript-api/k6-http/head-url-params/
816
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/head/
817
817
  * @param url - Request URL.
818
818
  * @param params - Request parameters.
819
819
  * @returns Resulting response.
@@ -827,7 +827,7 @@ declare namespace http {
827
827
 
828
828
  /**
829
829
  * Make GET request.
830
- * https://k6.io/docs/javascript-api/k6-http/get-url-params/
830
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/get/
831
831
  * @param url - Request URL.
832
832
  * @param params - Request parameters.
833
833
  * @returns Resulting response.
@@ -841,7 +841,7 @@ declare namespace http {
841
841
 
842
842
  /**
843
843
  * Make OPTIONS request.
844
- * https://k6.io/docs/javascript-api/k6-http/options-url-body-params/
844
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/options/
845
845
  * @param url - Request URL.
846
846
  * @param body - Request body. Object form encoded.
847
847
  * @param params - Request parameters.
@@ -855,7 +855,7 @@ declare namespace http {
855
855
 
856
856
  /**
857
857
  * Make PATCH request.
858
- * https://k6.io/docs/javascript-api/k6-http/patch-url-body-params/
858
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/patch/
859
859
  * @param url - Request URL.
860
860
  * @param body - Request body. Object form encoded.
861
861
  * @param params - Request parameters.
@@ -869,7 +869,7 @@ declare namespace http {
869
869
 
870
870
  /**
871
871
  * Make POST request.
872
- * https://k6.io/docs/javascript-api/k6-http/post-url-body-params/
872
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/post/
873
873
  * @param url - Request URL.
874
874
  * @param body - Request body. Object form encoded.
875
875
  * @param params - Request parameters.
@@ -887,7 +887,7 @@ declare namespace http {
887
887
 
888
888
  /**
889
889
  * Make PUT request.
890
- * https://k6.io/docs/javascript-api/k6-http/put-url-body-params/
890
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/put/
891
891
  * @param url - Request URL.
892
892
  * @param body - Request body. Object form encoded.
893
893
  * @param params - Request parameters.
@@ -901,7 +901,7 @@ declare namespace http {
901
901
 
902
902
  /**
903
903
  * Make request.
904
- * https://k6.io/docs/javascript-api/k6-http/request-method-url-body-params/
904
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/request/
905
905
  * @param method - HTTP method.
906
906
  * @param url - Request URL.
907
907
  * @param body - Request body. Object form encoded.
@@ -921,7 +921,7 @@ declare namespace http {
921
921
 
922
922
  /**
923
923
  * Make async request.
924
- * https://k6.io/docs/javascript-api/k6-http/asyncrequest/
924
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/asyncrequest/
925
925
  * @param method - HTTP method.
926
926
  * @param url - Request URL.
927
927
  * @param body - Request body. Object form encoded.
@@ -941,7 +941,7 @@ declare namespace http {
941
941
 
942
942
  /**
943
943
  * Creates a URL with set name tag.
944
- * https://k6.io/docs/using-k6/http-requests/#url-grouping
944
+ * https://grafana.com/docs/k6/latest/using-k6/http-requests/#url-grouping
945
945
  * @param strings - Passed string values.
946
946
  * @param args - Tagged template expressions.
947
947
  * @returns HTTP URL object.
@@ -953,7 +953,7 @@ declare namespace http {
953
953
  /**
954
954
  * Batch multiple HTTP requests together,
955
955
  * to issue them in parallel over multiple TCP connections.
956
- * https://k6.io/docs/javascript-api/k6-http/batch-requests/
956
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/batch/
957
957
  * @param requests - Request specifications.
958
958
  * @returns Resulting responses.
959
959
  * @example
@@ -977,7 +977,7 @@ declare namespace http {
977
977
 
978
978
  /**
979
979
  * Create a file object used for building multipart requests (file uploads).
980
- * https://k6.io/docs/javascript-api/k6-http/file-data-filename-contenttype
980
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/file/
981
981
  * @param data - File data.
982
982
  * @param filename - Filename. Included in MIME message.
983
983
  * @param contentType - Content type. Included in MIME message.
@@ -996,7 +996,7 @@ declare namespace http {
996
996
 
997
997
  /**
998
998
  * Get active cookie jar.
999
- * https://k6.io/docs/javascript-api/k6-http/cookiejar/
999
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/cookiejar/
1000
1000
  * @returns Active cookie jar.
1001
1001
  * @example
1002
1002
  * let jar = http.cookieJar();
@@ -1011,7 +1011,7 @@ declare namespace http {
1011
1011
 
1012
1012
  /**
1013
1013
  * Set the response callback to be called to determine if a response was expected/successful or not.
1014
- * https://k6.io/docs/javascript-api/k6-http/setresponsecallback-callback/
1014
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/setresponsecallback/
1015
1015
  */
1016
1016
  function setResponseCallback(responseCallback: ExpectedStatusesCallback): void;
1017
1017
  }
k6/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * k6 JavaScript API.
3
- * https://k6.io/docs/
3
+ * https://grafana.com/docs/k6/latest/
4
4
  *
5
5
  * @privateRemarks
6
6
  * Uses a branding pattern throughout to reflect the custom classes exposed by
@@ -29,6 +29,7 @@ import "./http";
29
29
  import "./metrics";
30
30
  import "./options";
31
31
  import "./experimental/browser";
32
+ import "./experimental/fs";
32
33
  import "./experimental/redis";
33
34
  import "./experimental/timers";
34
35
  import "./experimental/tracing";
@@ -43,7 +44,7 @@ import "./net/grpc";
43
44
 
44
45
  /**
45
46
  * Run checks on a value.
46
- * https://k6.io/docs/javascript-api/k6/check-val-sets-tags/
47
+ * https://grafana.com/docs/k6/latest/javascript-api/k6/check/
47
48
  * @template VT - Value type.
48
49
  * @param val - Value to test.
49
50
  * @param sets - Tests (checks) to run on the value.
@@ -59,7 +60,7 @@ export function check<VT>(val: VT, sets: Checkers<VT>, tags?: object): boolean;
59
60
 
60
61
  /**
61
62
  * Immediately throw an error, aborting the current script iteration.
62
- * https://k6.io/docs/javascript-api/k6/fail-err/
63
+ * https://grafana.com/docs/k6/latest/javascript-api/k6/fail/
63
64
  * @param err - Error message that gets printed to stderr.
64
65
  * @example
65
66
  * fail("abort current iteration");
@@ -68,7 +69,7 @@ export function fail(err?: string): never;
68
69
 
69
70
  /**
70
71
  * Run code inside a group.
71
- * https://k6.io/docs/javascript-api/k6/group-name-fn/
72
+ * https://grafana.com/docs/k6/latest/javascript-api/k6/group/
72
73
  * @template RT - Return type.
73
74
  * @param name - Name of the group.
74
75
  * @param fn - Group body. Code to be executed in the group context.
@@ -82,7 +83,7 @@ export function group<RT>(name: string, fn: () => RT): RT;
82
83
 
83
84
  /**
84
85
  * Set seed to get a reproducible pseudo-random number using Math.random.
85
- * https://k6.io/docs/javascript-api/k6/randomseed/
86
+ * https://grafana.com/docs/k6/latest/javascript-api/k6/randomseed/
86
87
  * @param int - The seed value.
87
88
  * @example
88
89
  * randomSeed(123456789);
@@ -91,7 +92,7 @@ export function randomSeed(int: number): void;
91
92
 
92
93
  /**
93
94
  * Suspend VU execution for the specified duration.
94
- * https://k6.io/docs/javascript-api/k6/sleep-t/
95
+ * https://grafana.com/docs/k6/latest/javascript-api/k6/sleep/
95
96
  * @param t - Duration, in seconds.
96
97
  * @example
97
98
  * sleep(3);
k6/metrics.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * Custom metrics.
3
- * https://k6.io/docs/javascript-api/k6-metrics/
3
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-metrics/
4
4
  */
5
5
 
6
6
  /**
@@ -28,7 +28,7 @@ export abstract class Metric {
28
28
 
29
29
  /**
30
30
  * Cumulative counter.
31
- * https://k6.io/docs/javascript-api/k6-metrics/counter-k6-metrics/
31
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-metrics/counter/
32
32
  *
33
33
  * @example
34
34
  * // Create instance on init context
@@ -43,7 +43,7 @@ export class Counter extends Metric {
43
43
 
44
44
  /**
45
45
  * Gauge. Holds only latest value.
46
- * https://k6.io/docs/javascript-api/k6-metrics/gauge-k6-metrics/
46
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-metrics/gauge/
47
47
  */
48
48
  export class Gauge extends Metric {
49
49
  protected __brand: never;
@@ -51,7 +51,7 @@ export class Gauge extends Metric {
51
51
 
52
52
  /**
53
53
  * Tracks percentage of nonzero values.
54
- * https://k6.io/docs/javascript-api/k6-metrics/rate-k6-metrics/
54
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-metrics/rate/
55
55
  */
56
56
  export class Rate extends Metric {
57
57
  protected __brand: never;
@@ -59,7 +59,7 @@ export class Rate extends Metric {
59
59
 
60
60
  /**
61
61
  * Calculates summary statistics.
62
- * https://k6.io/docs/javascript-api/k6-metrics/trend-k6-metrics/
62
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-metrics/trend/
63
63
  */
64
64
  export class Trend extends Metric {
65
65
  protected __brand: never;
k6/net/grpc.d.ts CHANGED
@@ -91,12 +91,12 @@ export interface Params {
91
91
 
92
92
  /**
93
93
  * This module provides a gRPC client for Remote Procedure Calls over HTTP/2.
94
- * https://k6.io/docs/javascript-api/k6-net-grpc/
94
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-net-grpc/
95
95
  */
96
96
  declare namespace grpc {
97
97
  /**
98
98
  * gRPC client to interact with a gRPC server.
99
- * https://k6.io/docs/javascript-api/k6-net-grpc/client/
99
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-net-grpc/client/
100
100
  */
101
101
  class Client {
102
102
  protected __brand: never;
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.48.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": "92f612bdd818eab9985e4e17ddac6e19ddcf5fc6bb074c54ea64667154090484",
69
+ "typeScriptVersion": "4.6"
65
70
  }