@types/k6 0.34.2 → 0.35.2

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 +1 -1
  2. k6/data.d.ts +5 -0
  3. k6/execution.d.ts +5 -0
  4. k6/index.d.ts +1 -1
  5. k6/net/grpc.d.ts +6 -4
  6. k6/package.json +3 -3
  7. k6/ws.d.ts +14 -0
k6/README.md CHANGED
@@ -8,7 +8,7 @@ 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: Wed, 20 Oct 2021 10:31:23 GMT
11
+ * Last updated: Mon, 29 Nov 2021 09:01:06 GMT
12
12
  * Dependencies: none
13
13
  * Global values: none
14
14
 
k6/data.d.ts CHANGED
@@ -3,6 +3,11 @@
3
3
  * https://k6.io/docs/javascript-api/k6-data/sharedarray/
4
4
  */
5
5
  export const SharedArray: {
6
+ /**
7
+ * Given a name and a function that returns an array, the SharedArray constructor returns the same array but sharing the array memory between VUs.
8
+ * https://k6.io/docs/javascript-api/k6-data/sharedarray/
9
+ */
10
+ new(name: string, callback: () => []): [];
6
11
  /**
7
12
  * Given a name and a function that returns an array, the SharedArray constructor returns the same array but sharing the array memory between VUs.
8
13
  * https://k6.io/docs/javascript-api/k6-data/sharedarray/
k6/execution.d.ts CHANGED
@@ -79,6 +79,11 @@ declare namespace execution {
79
79
  * The globally unique (across the whole test run) identifier of the VU.
80
80
  */
81
81
  idInTest: number;
82
+
83
+ /**
84
+ * Hash to set or get VU tags.
85
+ */
86
+ tags: Record<string, number | string | boolean>;
82
87
  };
83
88
  }
84
89
 
k6/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for k6 0.34
1
+ // Type definitions for k6 0.35
2
2
  // Project: https://k6.io/docs/
3
3
  // Definitions by: na-- <https://github.com/na-->
4
4
  // Ivan Mirić <https://github.com/imiric>
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
 
@@ -19,7 +19,9 @@ export interface Response {
19
19
  export interface ConnectParams {
20
20
  plaintext?: boolean;
21
21
 
22
- timeout?: number;
22
+ reflect?: boolean;
23
+
24
+ timeout?: string | number;
23
25
  }
24
26
 
25
27
  export interface Params {
@@ -27,7 +29,7 @@ export interface Params {
27
29
 
28
30
  tags?: object;
29
31
 
30
- timeout?: string;
32
+ timeout?: string | number;
31
33
  }
32
34
 
33
35
  /**
@@ -48,7 +50,7 @@ declare namespace grpc {
48
50
  connect(address: string, params?: ConnectParams): void;
49
51
 
50
52
  /** Loads and parses the protocol buffer descriptors. */
51
- load(importPaths: string[], protoFiles: string): void;
53
+ load(importPaths: string[], ...protoFiles: string[]): void;
52
54
 
53
55
  /** Invokes an unary RPC request. */
54
56
  invoke(url: string, request: object, params?: Params): Response;
k6/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/k6",
3
- "version": "0.34.2",
3
+ "version": "0.35.2",
4
4
  "description": "TypeScript definitions for k6",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6",
6
6
  "license": "MIT",
@@ -50,6 +50,6 @@
50
50
  },
51
51
  "scripts": {},
52
52
  "dependencies": {},
53
- "typesPublisherContentHash": "a0c95f6bb3f3029894f1263b00b2b0a0fe8d331c94d0f78ea2db2e4c7990c1d4",
54
- "typeScriptVersion": "3.7"
53
+ "typesPublisherContentHash": "ca7d040146a9286e432dcc648e2f7666b684edc2c55a2d9bd1df0e9c99154716",
54
+ "typeScriptVersion": "3.8"
55
55
  }
k6/ws.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { CookieJar } from './http';
2
+
1
3
  /**
2
4
  * Open WebSocket connection.
3
5
  * https://k6.io/docs/javascript-api/k6-ws/connect-url-params-callback/
@@ -41,8 +43,20 @@ export interface Params {
41
43
  /** Request headers. */
42
44
  headers?: { [name: string]: string };
43
45
 
46
+ /**
47
+ * Compression algorithm. The only supported algorithm is `deflate`.
48
+ * If the option is left unset or empty, it defaults to no compression.
49
+ */
50
+ compression?: string;
51
+
44
52
  /** Response time metric tags. */
45
53
  tags?: { [name: string]: string };
54
+
55
+ /**
56
+ * The cookie jar that will be used when making the initial HTTP request to establish the WebSocket connection.
57
+ * If empty, the default VU cookie jar will be used.
58
+ */
59
+ jar?: CookieJar;
46
60
  }
47
61
 
48
62
  /**