@types/k6 0.46.2 → 0.47.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/LICENSE +0 -0
- k6/README.md +1 -1
- k6/crypto.d.ts +14 -16
- k6/data.d.ts +2 -2
- k6/encoding.d.ts +3 -3
- k6/execution.d.ts +2 -2
- k6/experimental/browser.d.ts +268 -99
- k6/experimental/grpc.d.ts +8 -5
- k6/experimental/redis.d.ts +0 -1
- k6/experimental/timers.d.ts +0 -0
- k6/experimental/tracing.d.ts +3 -3
- k6/experimental/webcrypto.d.ts +17 -18
- k6/experimental/websockets.d.ts +9 -9
- k6/global.d.ts +2 -2
- k6/html.d.ts +0 -0
- k6/http.d.ts +54 -58
- k6/index.d.ts +19 -19
- k6/metrics.d.ts +0 -0
- k6/net/grpc.d.ts +5 -0
- k6/options.d.ts +17 -17
- k6/package.json +3 -3
- k6/ws.d.ts +9 -16
k6/LICENSE
CHANGED
|
File without changes
|
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:
|
|
11
|
+
* Last updated: Tue, 10 Oct 2023 12:42:36 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: none
|
|
14
14
|
|
k6/crypto.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bytes } from
|
|
1
|
+
import { bytes } from ".";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Generate random bytes.
|
|
@@ -151,25 +151,25 @@ export function createHMAC(algorithm: Algorithm, secret: string | ArrayBuffer):
|
|
|
151
151
|
* Hash algorithm.
|
|
152
152
|
*/
|
|
153
153
|
export type Algorithm =
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
|
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
|
|
|
162
|
-
|
|
|
154
|
+
| "md4"
|
|
155
|
+
| "md5"
|
|
156
|
+
| "sha1"
|
|
157
|
+
| "sha256"
|
|
158
|
+
| "sha384"
|
|
159
|
+
| "sha512"
|
|
160
|
+
| "sha512_224"
|
|
161
|
+
| "sha512_256"
|
|
162
|
+
| "ripemd160";
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
165
|
* String output encoding.
|
|
166
166
|
*/
|
|
167
|
-
export type StringEncoding =
|
|
167
|
+
export type StringEncoding = "hex" | "base64" | "base64url" | "base64rawurl";
|
|
168
168
|
|
|
169
169
|
/**
|
|
170
170
|
* Binary output encoding.
|
|
171
171
|
*/
|
|
172
|
-
export type BinaryEncoding =
|
|
172
|
+
export type BinaryEncoding = "binary";
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
175
|
* Output encoding.
|
|
@@ -180,10 +180,8 @@ export type OutputEncoding = StringEncoding | BinaryEncoding;
|
|
|
180
180
|
* Output type. Varies with output encoding.
|
|
181
181
|
* @template OE - Output encoding.
|
|
182
182
|
*/
|
|
183
|
-
export type Output<OE extends OutputEncoding> = OE extends StringEncoding
|
|
184
|
-
?
|
|
185
|
-
: OE extends BinaryEncoding
|
|
186
|
-
? bytes
|
|
183
|
+
export type Output<OE extends OutputEncoding> = OE extends StringEncoding ? string
|
|
184
|
+
: OE extends BinaryEncoding ? bytes
|
|
187
185
|
: never;
|
|
188
186
|
|
|
189
187
|
/**
|
k6/data.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ export const SharedArray: {
|
|
|
7
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
8
|
* https://k6.io/docs/javascript-api/k6-data/sharedarray/
|
|
9
9
|
*/
|
|
10
|
-
new
|
|
10
|
+
new(name: string, callback: () => []): [];
|
|
11
11
|
/**
|
|
12
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.
|
|
13
13
|
* https://k6.io/docs/javascript-api/k6-data/sharedarray/
|
|
14
14
|
*/
|
|
15
|
-
new
|
|
15
|
+
new<T>(name: string, callback: () => T[]): T[];
|
|
16
16
|
};
|
k6/encoding.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export function b64decode(input: string, encoding?: Base64Variant): ArrayBuffer;
|
|
|
24
24
|
* encoding.b64decode(str, 'rawstd')
|
|
25
25
|
* const decodedString = encoding.b64decode(str, 'rawurl', 's')
|
|
26
26
|
*/
|
|
27
|
-
export function b64decode(input: string, encoding: Base64Variant, format:
|
|
27
|
+
export function b64decode(input: string, encoding: Base64Variant, format: "s"): string;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Base64 encode a string.
|
|
@@ -41,7 +41,7 @@ export function b64encode(input: string | ArrayBuffer, encoding?: Base64Variant)
|
|
|
41
41
|
/**
|
|
42
42
|
* Base64 variant.
|
|
43
43
|
*/
|
|
44
|
-
export type Base64Variant =
|
|
44
|
+
export type Base64Variant = "std" | "rawstd" | "url" | "rawurl";
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* The encoding module provides base64 encoding/decoding.
|
|
@@ -73,7 +73,7 @@ declare namespace encoding {
|
|
|
73
73
|
* encoding.b64decode(str, 'rawstd')
|
|
74
74
|
* const decodedString = encoding.b64decode(str, 'rawurl', 's')
|
|
75
75
|
*/
|
|
76
|
-
function b64decode(input: string, encoding: Base64Variant, format:
|
|
76
|
+
function b64decode(input: string, encoding: Base64Variant, format: "s"): string;
|
|
77
77
|
/**
|
|
78
78
|
* Base64 decode a string.
|
|
79
79
|
* https://k6.io/docs/javascript-api/k6-encoding/b64decode-input-encoding/
|
k6/execution.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Options } from
|
|
1
|
+
import { Options } from "./options";
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
* The execution module provides information about the current test execution state.
|
|
@@ -114,7 +114,7 @@ declare namespace execution {
|
|
|
114
114
|
* Map to set or get VU metadata.
|
|
115
115
|
*/
|
|
116
116
|
metadata: Record<string, number | string | boolean>;
|
|
117
|
-
}
|
|
117
|
+
};
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
|