@types/k6 0.35.1 → 0.37.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.
Files changed (6) hide show
  1. k6/README.md +2 -2
  2. k6/execution.d.ts +16 -0
  3. k6/http.d.ts +28 -0
  4. k6/index.d.ts +3 -4
  5. k6/net/grpc.d.ts +3 -3
  6. k6/package.json +9 -14
k6/README.md CHANGED
@@ -8,9 +8,9 @@ This package contains type definitions for k6 (https://k6.io/docs/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 23 Nov 2021 17:01:03 GMT
11
+ * Last updated: Tue, 29 Mar 2022 08:01:44 GMT
12
12
  * Dependencies: none
13
13
  * Global values: none
14
14
 
15
15
  # Credits
16
- These definitions were written by [na--](https://github.com/na--), [Ivan Mirić](https://github.com/imiric), [Mihail Stoykov](https://github.com/MStoykov), [Ivan](https://github.com/codebien), [Inanc Gumus](https://github.com/inancgumus), [yorugac](https://github.com/yorugac), and [Pepe Cano](https://github.com/ppcano).
16
+ These definitions were written by [na--](https://github.com/na--), [Mihail Stoykov](https://github.com/MStoykov), [Ivan](https://github.com/codebien), [Théo Crevon](https://github.com/oleiade), [Oleg Bespalov](https://github.com/olegbespalov), and [Pepe Cano](https://github.com/ppcano).
k6/execution.d.ts CHANGED
@@ -59,6 +59,22 @@ declare namespace execution {
59
59
  currentTestRunDuration: number;
60
60
  };
61
61
 
62
+ /**
63
+ * Control the test execution.
64
+ */
65
+ const test: {
66
+ /**
67
+ * Aborts the test run with the exit code 108.
68
+ * https://k6.io/docs/javascript-api/k6-execution/#test
69
+ * @param input - Aborted message.
70
+ * @example
71
+ * import exec from "k6/execution";
72
+ * exec.test.abort();
73
+ * exec.test.abort('this is the reason');
74
+ */
75
+ abort(input?: string): void;
76
+ };
77
+
62
78
  /**
63
79
  * Information about the current virtual user.
64
80
  */
k6/http.d.ts CHANGED
@@ -15,6 +15,20 @@ export function del<RT extends ResponseType | undefined>(
15
15
  params?: RefinedParams<RT> | null
16
16
  ): RefinedResponse<RT>;
17
17
 
18
+ /**
19
+ * Make HEAD request.
20
+ * https://k6.io/docs/javascript-api/k6-http/head-url-params/
21
+ * @param url - Request URL.
22
+ * @param params - Request parameters.
23
+ * @returns Resulting response.
24
+ * @example
25
+ * http.head('https://test.k6.io')
26
+ */
27
+ export function head<RT extends ResponseType | undefined>(
28
+ url: string | HttpURL,
29
+ params?: RefinedParams<RT> | null
30
+ ): RefinedResponse<RT>;
31
+
18
32
  /**
19
33
  * Make GET request.
20
34
  * https://k6.io/docs/javascript-api/k6-http/get-url-params
@@ -764,6 +778,20 @@ declare namespace http {
764
778
  params?: RefinedParams<RT> | null
765
779
  ): RefinedResponse<RT>;
766
780
 
781
+ /**
782
+ * Make HEAD request.
783
+ * https://k6.io/docs/javascript-api/k6-http/head-url-params/
784
+ * @param url - Request URL.
785
+ * @param params - Request parameters.
786
+ * @returns Resulting response.
787
+ * @example
788
+ * http.head('https://test.k6.io')
789
+ */
790
+ function head<RT extends ResponseType | undefined>(
791
+ url: string | HttpURL,
792
+ params?: RefinedParams<RT> | null
793
+ ): RefinedResponse<RT>;
794
+
767
795
  /**
768
796
  * Make GET request.
769
797
  * https://k6.io/docs/javascript-api/k6-http/get-url-params/
k6/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
- // Type definitions for k6 0.35
1
+ // Type definitions for k6 0.37
2
2
  // Project: https://k6.io/docs/
3
3
  // Definitions by: na-- <https://github.com/na-->
4
- // Ivan Mirić <https://github.com/imiric>
5
4
  // Mihail Stoykov <https://github.com/MStoykov>
6
5
  // Ivan <https://github.com/codebien>
7
- // Inanc Gumus <https://github.com/inancgumus>
8
- // yorugac <https://github.com/yorugac>
6
+ // Théo Crevon <https://github.com/oleiade>
7
+ // Oleg Bespalov <https://github.com/olegbespalov>
9
8
  // Pepe Cano <https://github.com/ppcano>
10
9
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
11
10
  // TypeScript Version: 3.4
k6/net/grpc.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  export interface Response {
8
8
  status: number;
9
9
 
10
- message: string;
10
+ message: object;
11
11
 
12
12
  headers: object;
13
13
 
@@ -21,7 +21,7 @@ export interface ConnectParams {
21
21
 
22
22
  reflect?: boolean;
23
23
 
24
- timeout?: number;
24
+ timeout?: string | number;
25
25
  }
26
26
 
27
27
  export interface Params {
@@ -29,7 +29,7 @@ export interface Params {
29
29
 
30
30
  tags?: object;
31
31
 
32
- timeout?: string;
32
+ timeout?: string | number;
33
33
  }
34
34
 
35
35
  /**
k6/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/k6",
3
- "version": "0.35.1",
3
+ "version": "0.37.0",
4
4
  "description": "TypeScript definitions for k6",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6",
6
6
  "license": "MIT",
@@ -10,11 +10,6 @@
10
10
  "url": "https://github.com/na--",
11
11
  "githubUsername": "na--"
12
12
  },
13
- {
14
- "name": "Ivan Mirić",
15
- "url": "https://github.com/imiric",
16
- "githubUsername": "imiric"
17
- },
18
13
  {
19
14
  "name": "Mihail Stoykov",
20
15
  "url": "https://github.com/MStoykov",
@@ -26,14 +21,14 @@
26
21
  "githubUsername": "codebien"
27
22
  },
28
23
  {
29
- "name": "Inanc Gumus",
30
- "url": "https://github.com/inancgumus",
31
- "githubUsername": "inancgumus"
24
+ "name": "Théo Crevon",
25
+ "url": "https://github.com/oleiade",
26
+ "githubUsername": "oleiade"
32
27
  },
33
28
  {
34
- "name": "yorugac",
35
- "url": "https://github.com/yorugac",
36
- "githubUsername": "yorugac"
29
+ "name": "Oleg Bespalov",
30
+ "url": "https://github.com/olegbespalov",
31
+ "githubUsername": "olegbespalov"
37
32
  },
38
33
  {
39
34
  "name": "Pepe Cano",
@@ -50,6 +45,6 @@
50
45
  },
51
46
  "scripts": {},
52
47
  "dependencies": {},
53
- "typesPublisherContentHash": "2b0606fbf3023250fb4dab67d69800b200a5b65f6265eb7da480278f717ac652",
54
- "typeScriptVersion": "3.8"
48
+ "typesPublisherContentHash": "a640af732bafeea694ba7efc10969d7bfad3fe35b8573e07d6b255fe07045e22",
49
+ "typeScriptVersion": "3.9"
55
50
  }