@types/k6 2.3.0 → 2.3.1

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 (4) hide show
  1. k6/README.md +1 -1
  2. k6/browser/index.d.ts +1 -1
  3. k6/http/index.d.ts +17 -0
  4. k6/package.json +2 -2
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: Tue, 29 Sep 2026 02:43:36 GMT
11
+ * Last updated: Mon, 26 Oct 2026 18:50:21 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
k6/browser/index.d.ts CHANGED
@@ -1186,7 +1186,7 @@ export interface MetricMessage {
1186
1186
  * it's not set it will group all metrics regardless of the method
1187
1187
  * tag.
1188
1188
  */
1189
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "OPTIONS" | "HEAD" | "TRACE" | "CONNECT";
1189
+ method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "OPTIONS" | "HEAD" | "TRACE" | "CONNECT" | "QUERY";
1190
1190
  }>;
1191
1191
  }): void;
1192
1192
  }
k6/http/index.d.ts CHANGED
@@ -89,6 +89,23 @@ export function post<RT extends ResponseType | undefined>(
89
89
  params?: RefinedParams<RT> | null,
90
90
  ): RefinedResponse<RT>;
91
91
 
92
+ /**
93
+ * Make QUERY request (RFC 10008).
94
+ * https://grafana.com/docs/k6/latest/javascript-api/k6-http/query/
95
+ * @param url - Request URL.
96
+ * @param body - Request body. Object form encoded.
97
+ * @param params - Request parameters.
98
+ * @returns Resulting response.
99
+ * @example
100
+ * let headers = { 'Content-Type': 'application/json' };
101
+ * http.query(url, JSON.stringify({ filter: 'all' }), { headers: headers });
102
+ */
103
+ export function query<RT extends ResponseType | undefined>(
104
+ url: string | HttpURL,
105
+ body?: RequestBody | null,
106
+ params?: RefinedParams<RT> | null,
107
+ ): RefinedResponse<RT>;
108
+
92
109
  /**
93
110
  * Make PUT request.
94
111
  * https://grafana.com/docs/k6/latest/javascript-api/k6-http/put/
k6/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/k6",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
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": "13b252b0400d0e312551111e925b2604eba606d754637fdf79f7894274f352b9",
86
+ "typesPublisherContentHash": "a59d6cbb0574d4d9e82b12cdd3a8d86027b7ad64df90b9791d5ded3b0a5505f3",
87
87
  "typeScriptVersion": "5.6"
88
88
  }