@types/k6 0.36.0 → 0.38.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 (7) hide show
  1. k6/README.md +2 -2
  2. k6/execution.d.ts +4 -0
  3. k6/http.d.ts +28 -0
  4. k6/index.d.ts +3 -4
  5. k6/net/grpc.d.ts +5 -0
  6. k6/options.d.ts +4 -1
  7. 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: Mon, 24 Jan 2022 13:31:30 GMT
11
+ * Last updated: Wed, 31 Aug 2022 14:02:39 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
@@ -1,3 +1,5 @@
1
+ import { Options } from './options';
2
+
1
3
  /*
2
4
  * The execution module provides information about the current test execution state.
3
5
  * https://k6.io/docs/javascript-api/k6-execution/
@@ -73,6 +75,8 @@ declare namespace execution {
73
75
  * exec.test.abort('this is the reason');
74
76
  */
75
77
  abort(input?: string): void;
78
+
79
+ options: Options;
76
80
  };
77
81
 
78
82
  /**
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.36
1
+ // Type definitions for k6 0.38
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
@@ -25,8 +25,13 @@ export interface ConnectParams {
25
25
  }
26
26
 
27
27
  export interface Params {
28
+ /**
29
+ * @deprecated Use metadata instead.
30
+ */
28
31
  headers?: object;
29
32
 
33
+ metadata?: object;
34
+
30
35
  tags?: object;
31
36
 
32
37
  timeout?: string | number;
k6/options.d.ts CHANGED
@@ -179,10 +179,13 @@ export interface Certificate {
179
179
  cert: string;
180
180
 
181
181
  /** Domains certificate is valid for. */
182
- domains: string[];
182
+ domains?: string[];
183
183
 
184
184
  /** PEM encoded certificate key. */
185
185
  key: string;
186
+
187
+ /** PEM passphrase. */
188
+ password?: string;
186
189
  }
187
190
 
188
191
  export type ExecutorOptions = "shared-iterations" | "per-vu-iterations" | "constant-vus" | "ramping-vus" | "constant-arrival-rate" | "ramping-arrival-rate" | "externally-controlled";
k6/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/k6",
3
- "version": "0.36.0",
3
+ "version": "0.38.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": "010e15b4ef6fd0057dab81bd5cefb66c8fb4febb9183a0a6fa44c6842e878eb1",
54
- "typeScriptVersion": "3.8"
48
+ "typesPublisherContentHash": "9e87ca39f1c353c08783f7f964cea69fc889f6a0281b14f45e0a6dc313424ffc",
49
+ "typeScriptVersion": "4.1"
55
50
  }