@types/k6 2.2.0 → 2.3.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/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for k6 (https://grafana.com/docs/k6/lates
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, 17 Aug 2026 08:49:14 GMT
11
+ * Last updated: Tue, 29 Sep 2026 02:43:36 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
k6/options/index.d.ts CHANGED
@@ -119,6 +119,14 @@ export interface Options {
119
119
  /** Throw error on failed HTTP request. */
120
120
  throw?: boolean;
121
121
 
122
+ /**
123
+ * Fetch missing intermediate certificates through Authority Information Access (AIA)
124
+ * when a server sends an incomplete TLS certificate chain, while keeping certificate
125
+ * and hostname verification enabled. Requires hostname targets rather than IP addresses.
126
+ * Disabled by default. Has no effect when `insecureSkipTLSVerify` is true.
127
+ */
128
+ tlsAIAFetch?: boolean;
129
+
122
130
  /** TLS client certificates. */
123
131
  tlsAuth?: Certificate[];
124
132
 
k6/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/k6",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "TypeScript definitions for k6",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6",
6
6
  "license": "MIT",
@@ -83,6 +83,6 @@
83
83
  "scripts": {},
84
84
  "dependencies": {},
85
85
  "peerDependencies": {},
86
- "typesPublisherContentHash": "dee60892c6be63b85f1d84c8a3320a68a9c41816d00ef077bc39d5c81eabb8a3",
86
+ "typesPublisherContentHash": "13b252b0400d0e312551111e925b2604eba606d754637fdf79f7894274f352b9",
87
87
  "typeScriptVersion": "5.6"
88
88
  }
k6/websockets/index.d.ts CHANGED
@@ -122,6 +122,16 @@ export class WebSocket {
122
122
  * https://grafana.com/docs/k6/latest/javascript-api/k6-websockets/websocket/websocket-onpong/
123
123
  */
124
124
  onpong: () => void;
125
+
126
+ static readonly CONNECTING: 0;
127
+ static readonly OPEN: 1;
128
+ static readonly CLOSING: 2;
129
+ static readonly CLOSED: 3;
130
+
131
+ readonly CONNECTING: 0;
132
+ readonly OPEN: 1;
133
+ readonly CLOSING: 2;
134
+ readonly CLOSED: 3;
125
135
  }
126
136
 
127
137
  export type BlobPart = ArrayBuffer | ArrayBufferView | Blob | string;
@@ -171,72 +181,19 @@ export interface Params {
171
181
  /**
172
182
  * ReadyState describes the possible states of a WebSocket connection.
173
183
  */
174
- export enum ReadyState {
175
- /**
176
- * Socket has been created. The connection is not yet open.
177
- */
178
- Connecting = 0,
179
-
180
- /**
181
- * The connection is open and ready to communicate.
182
- */
183
- Open = 1,
184
-
185
- /**
186
- * The connection is in the process of closing.
187
- */
188
- Closing = 2,
189
-
190
- /**
191
- * The connection is closed or couldn't be opened.
192
- */
193
- Closed = 3,
194
- }
184
+ export type ReadyState = 0 | 1 | 2 | 3;
195
185
 
196
186
  /**
197
187
  * BinaryType describes the possible types of binary data that can be
198
188
  * transmitted over a Websocket connection.
199
189
  */
200
- export enum BinaryType {
201
- Blob = "blob",
202
- ArrayBuffer = "arraybuffer",
203
- }
190
+ export type BinaryType = "blob" | "arraybuffer";
204
191
 
205
192
  /**
206
193
  * EventName describes the possible events that can be emitted
207
194
  * by a Websocket connection.
208
195
  */
209
- export enum EventName {
210
- /**
211
- * Event fired when the connection is opened and ready to communicate.
212
- */
213
- Open = "open",
214
-
215
- /**
216
- * Event fired when the connection has been closed.
217
- */
218
- Close = "close",
219
-
220
- /**
221
- * Event fired when a connection has been closed due to an error.
222
- */
223
- Error = "error",
224
-
225
- /**
226
- * Event fired when a message has been received from the server.
227
- */
228
- Message = "message",
229
-
230
- /**
231
- * Event fired when a ping message has been received from the server.
232
- */
233
- Ping = "ping",
234
-
235
- /**
236
- * Event fired when a pong message has been received from the server.
237
- */
238
- Pong = "pong",
239
- }
196
+ export type EventName = "open" | "close" | "error" | "message" | "ping" | "pong";
240
197
 
241
198
  /**
242
199
  * MessageEvent is a simple interface that holds the data of a message received from the server.
@@ -250,7 +207,7 @@ export interface MessageEvent {
250
207
  /**
251
208
  * the type of the event.
252
209
  */
253
- type: MessageType;
210
+ type: EventName;
254
211
 
255
212
  /**
256
213
  * The read-only property that returns the time (in milliseconds) at which the event was created.
@@ -258,40 +215,6 @@ export interface MessageEvent {
258
215
  timestamp: number;
259
216
  }
260
217
 
261
- /**
262
- * WebSocket message types, as defined in RFC 6455, section 11.8.
263
- */
264
- export enum MessageType {
265
- /**
266
- * The message is a text message. The text message payload is
267
- * interpreted as UTF-8 encodedtext data.
268
- */
269
- Text = 1,
270
-
271
- /**
272
- * The message is a binary message.
273
- */
274
- Binary = 2,
275
-
276
- /**
277
- * The message is a close control message. The optional message
278
- * payload contains a numeric code and a text reason.
279
- */
280
- Close = 8,
281
-
282
- /**
283
- * The message is a ping control message. The optional message
284
- * payload is UTF-8 encoded text.
285
- */
286
- PingMessage = 9,
287
-
288
- /**
289
- * The message is a pong control message. The optional message
290
- * payload is UTF-8 encoded text.
291
- */
292
- PongMessage = 10,
293
- }
294
-
295
218
  /**
296
219
  * ErrorEvent is a simple interface that holds the data of an error event.
297
220
  */
@@ -299,7 +222,7 @@ export interface ErrorEvent {
299
222
  /**
300
223
  * the type of the event.
301
224
  */
302
- type: MessageType;
225
+ type: EventName;
303
226
 
304
227
  /**
305
228
  * The read-only property that returns the error message.
@@ -315,10 +238,4 @@ export interface ErrorEvent {
315
238
  /**
316
239
  * CompressionAlgorithm describes the possible compression algorithms.
317
240
  */
318
- export enum CompressionAlgorithm {
319
- /**
320
- * Deflate compression algorithm.
321
- * k6 supports only this compression algorithm.
322
- */
323
- Deflate = "deflate",
324
- }
241
+ export type CompressionAlgorithm = "deflate";