@types/k6 0.46.2 → 0.46.3

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 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: Fri, 18 Aug 2023 18:02:54 GMT
11
+ * Last updated: Thu, 14 Sep 2023 01:49:18 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
- | 'md4'
155
- | 'md5'
156
- | 'sha1'
157
- | 'sha256'
158
- | 'sha384'
159
- | 'sha512'
160
- | 'sha512_224'
161
- | 'sha512_256'
162
- | 'ripemd160';
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 = 'hex' | 'base64' | 'base64url' | 'base64rawurl';
167
+ export type StringEncoding = "hex" | "base64" | "base64url" | "base64rawurl";
168
168
 
169
169
  /**
170
170
  * Binary output encoding.
171
171
  */
172
- export type BinaryEncoding = 'binary';
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
- ? string
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 (name: string, callback: () => []): [];
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 <T>(name: string, callback: () => T[]): T[];
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: 's'): string;
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 = 'std' | 'rawstd' | 'url' | 'rawurl';
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: 's'): string;
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 './options';
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
 
@@ -13,16 +13,11 @@ export type EvaluationArgument = object;
13
13
 
14
14
  export type PageFunction<Arg, R> = string | ((arg: Unboxed<Arg>) => R);
15
15
 
16
- export type Unboxed<Arg> = Arg extends [infer A0, infer A1]
17
- ? [Unboxed<A0>, Unboxed<A1>]
18
- : Arg extends [infer A0, infer A1, infer A2]
19
- ? [Unboxed<A0>, Unboxed<A1>, Unboxed<A2>]
20
- : Arg extends [infer A0, infer A1, infer A2, infer A3]
21
- ? [Unboxed<A0>, Unboxed<A1>, Unboxed<A2>, Unboxed<A3>]
22
- : Arg extends Array<infer T>
23
- ? Array<Unboxed<T>>
24
- : Arg extends object
25
- ? { [Key in keyof Arg]: Unboxed<Arg[Key]> }
16
+ export type Unboxed<Arg> = Arg extends [infer A0, infer A1] ? [Unboxed<A0>, Unboxed<A1>]
17
+ : Arg extends [infer A0, infer A1, infer A2] ? [Unboxed<A0>, Unboxed<A1>, Unboxed<A2>]
18
+ : Arg extends [infer A0, infer A1, infer A2, infer A3] ? [Unboxed<A0>, Unboxed<A1>, Unboxed<A2>, Unboxed<A3>]
19
+ : Arg extends Array<infer T> ? Array<Unboxed<T>>
20
+ : Arg extends object ? { [Key in keyof Arg]: Unboxed<Arg[Key]> }
26
21
  : Arg;
27
22
 
28
23
  export interface SelectOptionsObject {
@@ -43,24 +38,24 @@ export interface SelectOptionsObject {
43
38
  }
44
39
 
45
40
  export type ResourceType =
46
- | 'document'
47
- | 'stylesheet'
48
- | 'image'
49
- | 'media'
50
- | 'font'
51
- | 'script'
52
- | 'texttrack'
53
- | 'xhr'
54
- | 'fetch'
55
- | 'eventsource'
56
- | 'websocket'
57
- | 'manifest'
58
- | 'other';
59
- export type MouseButton = 'left' | 'right' | 'middle';
60
- export type KeyboardModifier = 'Alt' | 'Control' | 'Meta' | 'Shift';
61
- export type ElementState = 'attached' | 'detached' | 'visible' | 'hidden';
62
- export type InputElementState = ElementState | 'enabled' | 'disabled' | 'editable';
63
- export type LifecycleEvent = 'load' | 'domcontentloaded' | 'networkidle';
41
+ | "document"
42
+ | "stylesheet"
43
+ | "image"
44
+ | "media"
45
+ | "font"
46
+ | "script"
47
+ | "texttrack"
48
+ | "xhr"
49
+ | "fetch"
50
+ | "eventsource"
51
+ | "websocket"
52
+ | "manifest"
53
+ | "other";
54
+ export type MouseButton = "left" | "right" | "middle";
55
+ export type KeyboardModifier = "Alt" | "Control" | "Meta" | "Shift";
56
+ export type ElementState = "attached" | "detached" | "visible" | "hidden";
57
+ export type InputElementState = ElementState | "enabled" | "disabled" | "editable";
58
+ export type LifecycleEvent = "load" | "domcontentloaded" | "networkidle";
64
59
 
65
60
  export interface TimeoutOptions {
66
61
  /**
@@ -125,14 +120,16 @@ export interface KeyboardModifierOptions {
125
120
  modifiers?: KeyboardModifier[];
126
121
  }
127
122
 
128
- export type KeyboardPressOptions = {
129
- /**
130
- * If set to `true` and a navigation occurs from performing this action, it
131
- * will not wait for it to complete. Defaults to `false`.
132
- */
133
- noWaitAfter?: boolean;
134
- } & EventSequenceOptions &
135
- TimeoutOptions;
123
+ export type KeyboardPressOptions =
124
+ & {
125
+ /**
126
+ * If set to `true` and a navigation occurs from performing this action, it
127
+ * will not wait for it to complete. Defaults to `false`.
128
+ */
129
+ noWaitAfter?: boolean;
130
+ }
131
+ & EventSequenceOptions
132
+ & TimeoutOptions;
136
133
 
137
134
  export type MouseMoveOptions = ElementClickOptions & KeyboardModifierOptions;
138
135
 
@@ -309,7 +306,7 @@ export interface Rect {
309
306
  height: number;
310
307
  }
311
308
 
312
- export type ImageFormat = 'jpeg' | 'png';
309
+ export type ImageFormat = "jpeg" | "png";
313
310
 
314
311
  export interface ScreenshotOptions {
315
312
  /**
@@ -343,14 +340,14 @@ export interface ScreenshotOptions {
343
340
  * - `mutation` - use a mutation observer
344
341
  * - `interval` - use a polling interval
345
342
  */
346
- export type PollingMethod = 'raf' | 'mutation' | 'interval';
343
+ export type PollingMethod = "raf" | "mutation" | "interval";
347
344
 
348
345
  export interface PollingOptions {
349
346
  /**
350
347
  * Polling method to use.
351
348
  * @default 'raf'
352
349
  */
353
- polling?: 'raf' | 'mutation' | 'interval';
350
+ polling?: "raf" | "mutation" | "interval";
354
351
 
355
352
  /**
356
353
  * Polling interval in milliseconds if `polling` is set to `interval`.
@@ -370,13 +367,22 @@ export interface ElementStateFilter {
370
367
  * BrowserPermissions defines all the possible permissions that can be granted
371
368
  * to the browser application.
372
369
  */
373
- export type BrowserPermissions = 'geolocation' | 'midi' | 'midi-sysex' |
374
- 'notifications' | 'camera' |
375
- 'microphone' | 'background-sync' |
376
- 'ambient-light-sensor' | 'accelerometer' |
377
- 'gyroscope' | 'magnetometer' |
378
- 'accessibility-events' | 'clipboard-read' |
379
- 'clipboard-write' | 'payment-handler';
370
+ export type BrowserPermissions =
371
+ | "geolocation"
372
+ | "midi"
373
+ | "midi-sysex"
374
+ | "notifications"
375
+ | "camera"
376
+ | "microphone"
377
+ | "background-sync"
378
+ | "ambient-light-sensor"
379
+ | "accelerometer"
380
+ | "gyroscope"
381
+ | "magnetometer"
382
+ | "accessibility-events"
383
+ | "clipboard-read"
384
+ | "clipboard-write"
385
+ | "payment-handler";
380
386
 
381
387
  export interface NewBrowserContextOptions {
382
388
  /**
@@ -390,7 +396,7 @@ export interface NewBrowserContextOptions {
390
396
  * are `'light'`, `'dark'`, and `'no-preference'`. Default to
391
397
  * `'light'`.
392
398
  */
393
- colorScheme?: 'light' | 'dark' | 'no-preference';
399
+ colorScheme?: "light" | "dark" | "no-preference";
394
400
 
395
401
  /**
396
402
  * Sets the resolution ratio in physical pixels to the resolution in
@@ -480,7 +486,7 @@ export interface NewBrowserContextOptions {
480
486
  * 'prefers-reduced-motion' media feature. Defaults to
481
487
  * `'no-preference'`.
482
488
  */
483
- reducedMotion?: 'reduce' | 'no-preference';
489
+ reducedMotion?: "reduce" | "no-preference";
484
490
 
485
491
  /**
486
492
  * Sets a window screen size for all pages in the context. It can
@@ -599,37 +605,39 @@ export interface BrowserContext {
599
605
  /**
600
606
  * Adds cookies into the `BrowserContext`.
601
607
  */
602
- addCookies(cookies: Array<{
603
- name: string,
608
+ addCookies(
609
+ cookies: Array<{
610
+ name: string;
604
611
 
605
- value: string,
612
+ value: string;
606
613
 
607
- /**
608
- * either url or domain / path are required.
609
- */
610
- url?: string,
614
+ /**
615
+ * either url or domain / path are required.
616
+ */
617
+ url?: string;
611
618
 
612
- /**
613
- * either url or domain / path are required.
614
- */
615
- domain?: string,
619
+ /**
620
+ * either url or domain / path are required.
621
+ */
622
+ domain?: string;
616
623
 
617
- /**
618
- * either url or domain / path are required.
619
- */
620
- path?: string,
624
+ /**
625
+ * either url or domain / path are required.
626
+ */
627
+ path?: string;
621
628
 
622
- /**
623
- * Unix time in seconds.
624
- */
625
- expires?: number,
629
+ /**
630
+ * Unix time in seconds.
631
+ */
632
+ expires?: number;
626
633
 
627
- httpOnly?: boolean,
634
+ httpOnly?: boolean;
628
635
 
629
- secure?: boolean,
636
+ secure?: boolean;
630
637
 
631
- sameSite?: 'Strict' | 'Lax' | 'None',
632
- }>): void;
638
+ sameSite?: "Strict" | "Lax" | "None";
639
+ }>,
640
+ ): void;
633
641
 
634
642
  /**
635
643
  * Clear the `BrowserContext`'s cookies.
@@ -658,7 +666,7 @@ export interface BrowserContext {
658
666
  /**
659
667
  * The origin to grant permissions to, e.g. 'https://test.k6.com'.
660
668
  */
661
- origin: string,
669
+ origin: string;
662
670
  },
663
671
  ): void;
664
672
 
@@ -738,7 +746,6 @@ export interface BrowserContext {
738
746
  * always wait for 'close' or 'page' events.
739
747
  */
740
748
  event: string,
741
-
742
749
  /**
743
750
  * The `Page` or null event data will be passed to it and it must
744
751
  * return true to continue.
@@ -754,13 +761,13 @@ export interface BrowserContext {
754
761
  * If null is passed to predicate, this signals that the page is
755
762
  * closing.
756
763
  */
757
- predicate: (page: Page | null) => boolean,
764
+ predicate: (page: Page | null) => boolean;
758
765
 
759
766
  /**
760
767
  * Maximum time to wait in milliseconds. Pass 0 to disable timeout.
761
768
  * Defaults to 30000 milliseconds.
762
769
  */
763
- timeout?: number,
770
+ timeout?: number;
764
771
  },
765
772
  ): Page | null;
766
773
  }
@@ -1908,19 +1915,19 @@ export interface Page {
1908
1915
  * Emulates `'prefers-colors-scheme'` media feature, supported values are
1909
1916
  * `'light'`, `'dark'`, and `'no-preference'`.
1910
1917
  */
1911
- colorScheme?: 'light' | 'dark' | 'no-preference';
1918
+ colorScheme?: "light" | "dark" | "no-preference";
1912
1919
 
1913
1920
  /**
1914
1921
  * Changes the CSS media type of the page. The only allowed values are
1915
1922
  * `'screen'`, and `'print'`.
1916
1923
  */
1917
- media?: 'screen' | 'print';
1924
+ media?: "screen" | "print";
1918
1925
 
1919
1926
  /**
1920
1927
  * Emulates `'prefers-reduced-motion'` media feature, supported values are
1921
1928
  * `'reduce'`, `'no-preference'`.
1922
1929
  */
1923
- reducedMotion?: 'reduce' | 'no-preference';
1930
+ reducedMotion?: "reduce" | "no-preference";
1924
1931
  }): void;
1925
1932
 
1926
1933
  /**
@@ -1936,7 +1943,7 @@ export interface Page {
1936
1943
  * @param type
1937
1944
  */
1938
1945
  emulateVisionDeficiency(
1939
- type: 'none' | 'blurredVision' | 'deuteranopia' | 'protanopia' | 'tritanopia' | 'achromatopsia',
1946
+ type: "none" | "blurredVision" | "deuteranopia" | "protanopia" | "tritanopia" | "achromatopsia",
1940
1947
  ): void;
1941
1948
 
1942
1949
  /**
@@ -2535,7 +2542,6 @@ export interface Page {
2535
2542
  * page.setDefaultTimeout(timeout) methods.
2536
2543
  *
2537
2544
  * Setting the value to `0` will disable the timeout.
2538
- *
2539
2545
  */
2540
2546
  timeout?: number;
2541
2547
 
@@ -2551,7 +2557,7 @@ export interface Page {
2551
2557
  * this method for testing especially with chatty websites where the event
2552
2558
  * may never fire, rely on web assertions to assess readiness instead.
2553
2559
  */
2554
- waitUntil?: 'load' | 'domcontentloaded' | 'networkidle';
2560
+ waitUntil?: "load" | "domcontentloaded" | "networkidle";
2555
2561
  }): null | Response;
2556
2562
 
2557
2563
  /**
@@ -2660,7 +2666,6 @@ export interface Page {
2660
2666
  * page.setDefaultTimeout(timeout) methods.
2661
2667
  *
2662
2668
  * Setting the value to `0` will disable the timeout.
2663
- *
2664
2669
  */
2665
2670
  timeout?: number;
2666
2671
 
@@ -2676,7 +2681,7 @@ export interface Page {
2676
2681
  * this method for testing especially with chatty websites where the event
2677
2682
  * may never fire, rely on web assertions to assess readiness instead.
2678
2683
  */
2679
- waitUntil?: 'load' | 'domcontentloaded' | 'networkidle';
2684
+ waitUntil?: "load" | "domcontentloaded" | "networkidle";
2680
2685
  },
2681
2686
  ): void;
2682
2687
 
@@ -2970,7 +2975,7 @@ export interface Page {
2970
2975
  * treated as an interval in milliseconds at which the function would be
2971
2976
  * executed. Defaults to `raf`.
2972
2977
  */
2973
- polling?: number | 'raf';
2978
+ polling?: number | "raf";
2974
2979
 
2975
2980
  /**
2976
2981
  * Maximum time in milliseconds. Defaults to `30` seconds. Default is
@@ -3000,7 +3005,7 @@ export interface Page {
3000
3005
  * @param options
3001
3006
  */
3002
3007
  waitForLoadState(
3003
- state?: 'load' | 'domcontentloaded' | 'networkidle',
3008
+ state?: "load" | "domcontentloaded" | "networkidle",
3004
3009
  options?: {
3005
3010
  /**
3006
3011
  * Maximum operation time in milliseconds. Defaults to `30` seconds. The
@@ -3011,7 +3016,6 @@ export interface Page {
3011
3016
  * page.setDefaultTimeout(timeout) methods.
3012
3017
  *
3013
3018
  * Setting the value to `0` will disable the timeout.
3014
- *
3015
3019
  */
3016
3020
  timeout?: number;
3017
3021
  },
@@ -3033,7 +3037,6 @@ export interface Page {
3033
3037
  * page.setDefaultTimeout(timeout) methods.
3034
3038
  *
3035
3039
  * Setting the value to `0` will disable the timeout.
3036
- *
3037
3040
  */
3038
3041
  timeout?: number;
3039
3042
 
@@ -3049,7 +3052,7 @@ export interface Page {
3049
3052
  * this method for testing especially with chatty websites where the event
3050
3053
  * may never fire, rely on web assertions to assess readiness instead.
3051
3054
  */
3052
- waitUntil?: 'load' | 'domcontentloaded' | 'networkidle';
3055
+ waitUntil?: "load" | "domcontentloaded" | "networkidle";
3053
3056
  }): Promise<null | Response>;
3054
3057
 
3055
3058
  /**
@@ -3073,7 +3076,7 @@ export interface Page {
3073
3076
  * - `'hidden'` - wait for element to be either detached from DOM, or have
3074
3077
  * an empty bounding box or `visibility:hidden`.
3075
3078
  */
3076
- state?: 'attached' | 'detached' | 'visible' | 'hidden';
3079
+ state?: "attached" | "detached" | "visible" | "hidden";
3077
3080
 
3078
3081
  /**
3079
3082
  * When `true`, the call requires selector to resolve to a single element.
k6/experimental/grpc.d.ts CHANGED
@@ -128,17 +128,15 @@ declare namespace grpc {
128
128
  /**
129
129
  * Event fired when data has been received from the server.
130
130
  */
131
- | 'data'
132
-
131
+ | "data"
133
132
  /**
134
133
  * Event fired when a stream has been closed due to an error.
135
134
  */
136
- | 'error'
137
-
135
+ | "error"
138
136
  /**
139
137
  * Event fired when the stream closes.
140
138
  */
141
- | 'end';
139
+ | "end";
142
140
 
143
141
  /**
144
142
  * Stream allows you to use streaming RPCs.
@@ -347,7 +347,6 @@ export class Client {
347
347
  hsetnx(key: string, field: string, value: string): Promise<boolean>;
348
348
 
349
349
  /**
350
- *
351
350
  * Returns the value of the specified hash field.
352
351
  *
353
352
  * https://k6.io/docs/javascript-api/k6-experimental/redis/client/client-hget
File without changes
@@ -8,7 +8,7 @@
8
8
  * https://k6.io/docs/javascript-api/k6-experimental/tracing/
9
9
  */
10
10
 
11
- import { RefinedParams, RefinedResponse, RequestBody, ResponseType } from '../http';
11
+ import { RefinedParams, RefinedResponse, RequestBody, ResponseType } from "../http";
12
12
 
13
13
  /**
14
14
  * The instrumentHTTP function instruments the k6 http module
@@ -186,7 +186,7 @@ export interface Options {
186
186
  *
187
187
  * Defaults to `w3c`.
188
188
  */
189
- propagator: 'w3c' | 'jaeger';
189
+ propagator: "w3c" | "jaeger";
190
190
 
191
191
  /**
192
192
  * The probability of each request having
@@ -202,5 +202,5 @@ export interface Options {
202
202
  * Returned value from http.url method.
203
203
  */
204
204
  export interface HttpURL {
205
- __brand: 'http-url';
205
+ __brand: "http-url";
206
206
  }
@@ -17,7 +17,6 @@ export interface Crypto extends SubtleCrypto {
17
17
  /**
18
18
  * Fills the passed TypedArray with cryptographically sound random values.
19
19
  *
20
- *
21
20
  * @param typedArray - The TypedArray to fill with random values.
22
21
  * @throws {QuotaExceededError} - thrown if the `byteLength` of `typedArray` exceeds 65536.
23
22
  * @returns The typedArray argument.
@@ -99,7 +98,7 @@ export interface SubtleCrypto {
99
98
  * @throws {TypeError} - when trying to use an invalid format.
100
99
  * @returns A promise that resolves with the exported key.
101
100
  */
102
- exportKey(format: 'raw', key: CryptoKey): Promise<ArrayBuffer>;
101
+ exportKey(format: "raw", key: CryptoKey): Promise<ArrayBuffer>;
103
102
 
104
103
  /**
105
104
  * Use the `generateKey()` method to generate a new key (for symmetric
@@ -114,7 +113,7 @@ export interface SubtleCrypto {
114
113
  generateKey(
115
114
  algorithm: AesKeyGenParams | HmacKeyGenParams,
116
115
  extractable: boolean,
117
- keyUsages: Array<'encrypt' | 'decrypt' | 'sign' | 'verify'>,
116
+ keyUsages: Array<"encrypt" | "decrypt" | "sign" | "verify">,
118
117
  ): Promise<CryptoKey>;
119
118
 
120
119
  /**
@@ -132,11 +131,11 @@ export interface SubtleCrypto {
132
131
  * @returns A promise that resolves with the imported `CryptoKey`.
133
132
  */
134
133
  importKey(
135
- format: 'raw',
134
+ format: "raw",
136
135
  keyData: ArrayBuffer | ArrayBufferView | DataView,
137
- algorithm: 'AES-CBC' | 'AES-CTR' | 'AES-GCM' | Algorithm<'AES-CBC' | 'AES-CTR' | 'AES-GCM'> | HmacImportParams,
136
+ algorithm: "AES-CBC" | "AES-CTR" | "AES-GCM" | Algorithm<"AES-CBC" | "AES-CTR" | "AES-GCM"> | HmacImportParams,
138
137
  extractable: boolean,
139
- keyUsages: Array<'encrypt' | 'decrypt' | 'sign' | 'verify'>,
138
+ keyUsages: Array<"encrypt" | "decrypt" | "sign" | "verify">,
140
139
  ): Promise<CryptoKey>;
141
140
 
142
141
  /**
@@ -152,7 +151,7 @@ export interface SubtleCrypto {
152
151
  * @returns A promise that resolves with the signature.
153
152
  */
154
153
  sign(
155
- algorithm: 'HMAC' | Algorithm<'HMAC'>,
154
+ algorithm: "HMAC" | Algorithm<"HMAC">,
156
155
  key: CryptoKey,
157
156
  data: ArrayBuffer | ArrayBufferView | DataView,
158
157
  ): Promise<ArrayBuffer>;
@@ -168,7 +167,7 @@ export interface SubtleCrypto {
168
167
  * @returns A promise that resolves with a boolean indicating whether the signature is valid.
169
168
  */
170
169
  verify(
171
- algorithm: 'HMAC' | Algorithm<'HMAC'>,
170
+ algorithm: "HMAC" | Algorithm<"HMAC">,
172
171
  key: CryptoKey,
173
172
  signature: ArrayBuffer | ArrayBufferView | DataView,
174
173
  data: ArrayBuffer | ArrayBufferView | DataView,
@@ -179,7 +178,7 @@ export interface CryptoKey {
179
178
  /**
180
179
  * The type of key the object represents.
181
180
  */
182
- readonly type: 'secret' | 'private' | 'public';
181
+ readonly type: "secret" | "private" | "public";
183
182
 
184
183
  /**
185
184
  * A boolean value indicating whether or not the
@@ -197,7 +196,7 @@ export interface CryptoKey {
197
196
  /**
198
197
  * An array of strings, indicating what can be done with the key.
199
198
  */
200
- readonly usages: Array<'encrypt' | 'decrypt' | 'sign' | 'verify'>;
199
+ readonly usages: Array<"encrypt" | "decrypt" | "sign" | "verify">;
201
200
  }
202
201
 
203
202
  /**
@@ -222,7 +221,7 @@ export type AlgorithmIdentifier = string;
222
221
  * The `HashAlgorithmIdentifier` type of the Web Crypto API represents
223
222
  * the name of a hash algorithm.
224
223
  */
225
- export type HashAlgorithmIdentifier = 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512';
224
+ export type HashAlgorithmIdentifier = "SHA-1" | "SHA-256" | "SHA-384" | "SHA-512";
226
225
 
227
226
  /**
228
227
  * The `AesKeyGenParams` dictionary of the Web Crypto API represents the
@@ -233,7 +232,7 @@ export interface AesKeyGenParams extends Algorithm<AlgorithmIdentifier> {
233
232
  /**
234
233
  * The name of the algorithm to use.
235
234
  */
236
- name: 'AES-GCM' | 'AES-CBC' | 'AES-CTR' | 'AES-CFB' | 'AES-KW';
235
+ name: "AES-GCM" | "AES-CBC" | "AES-CTR" | "AES-CFB" | "AES-KW";
237
236
 
238
237
  /**
239
238
  * The length of the key, in bits.
@@ -251,7 +250,7 @@ export interface AesCtrParams extends Algorithm<AlgorithmIdentifier> {
251
250
  /**
252
251
  * The name of the algorithm to use.
253
252
  */
254
- name: 'AES-CTR';
253
+ name: "AES-CTR";
255
254
 
256
255
  /**
257
256
  * The initial value of the counter block. This must be 16-byte
@@ -280,7 +279,7 @@ export interface AesCbcParams extends Algorithm<AlgorithmIdentifier> {
280
279
  /**
281
280
  * The name of the algorithm to use.
282
281
  */
283
- name: 'AES-CBC';
282
+ name: "AES-CBC";
284
283
 
285
284
  /**
286
285
  * The initialization vector to use for the operation.
@@ -301,7 +300,7 @@ export interface AesGcmParams extends Algorithm<AlgorithmIdentifier> {
301
300
  /**
302
301
  * The name of the algorithm to use.
303
302
  */
304
- name: 'AES-GCM';
303
+ name: "AES-GCM";
305
304
 
306
305
  /**
307
306
  * The initialization vector to use for the operation.
@@ -338,12 +337,12 @@ export interface HmacKeyGenParams extends Algorithm<AlgorithmIdentifier> {
338
337
  /**
339
338
  * The name of the algorithm to use.
340
339
  */
341
- name: 'HMAC';
340
+ name: "HMAC";
342
341
 
343
342
  /**
344
343
  * A string representing the name of the digest function to use.
345
344
  */
346
- hash: 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512';
345
+ hash: "SHA-1" | "SHA-256" | "SHA-384" | "SHA-512";
347
346
 
348
347
  /**
349
348
  * The length of the key, in bits. If the length is not specified,
@@ -363,7 +362,7 @@ export interface HmacImportParams extends Algorithm<AlgorithmIdentifier> {
363
362
  /**
364
363
  * The name of the algorithm to use.
365
364
  */
366
- name: 'HMAC';
365
+ name: "HMAC";
367
366
 
368
367
  /**
369
368
  * The name of the digest function to use.
@@ -1,4 +1,4 @@
1
- import { CookieJar } from '../http';
1
+ import { CookieJar } from "../http";
2
2
 
3
3
  /**
4
4
  * This module provides an experimental implementation of the WebSocket API
@@ -180,7 +180,7 @@ export enum BinaryType {
180
180
  /**
181
181
  * Binary data is returned in ArrayBuffer form. k6 supports only this type.
182
182
  */
183
- ArrayBuffer = 'ArrayBuffer',
183
+ ArrayBuffer = "ArrayBuffer",
184
184
  }
185
185
 
186
186
  /**
@@ -191,32 +191,32 @@ export enum EventName {
191
191
  /**
192
192
  * Event fired when the connection is opened and ready to communicate.
193
193
  */
194
- Open = 'open',
194
+ Open = "open",
195
195
 
196
196
  /**
197
197
  * Event fired when the connection has been closed.
198
198
  */
199
- Close = 'close',
199
+ Close = "close",
200
200
 
201
201
  /**
202
202
  * Event fired when a connection has been closed due to an error.
203
203
  */
204
- Error = 'error',
204
+ Error = "error",
205
205
 
206
206
  /**
207
207
  * Event fired when a message has been received from the server.
208
208
  */
209
- Message = 'message',
209
+ Message = "message",
210
210
 
211
211
  /**
212
212
  * Event fired when a ping message has been received from the server.
213
213
  */
214
- Ping = 'ping',
214
+ Ping = "ping",
215
215
 
216
216
  /**
217
217
  * Event fired when a pong message has been received from the server.
218
218
  */
219
- Pong = 'pong',
219
+ Pong = "pong",
220
220
  }
221
221
 
222
222
  /**
@@ -301,5 +301,5 @@ export enum CompressionAlgorithm {
301
301
  * Deflate compression algorithm.
302
302
  * k6 supports only this compression algorithm.
303
303
  */
304
- Deflate = 'deflate',
304
+ Deflate = "deflate",
305
305
  }
k6/global.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * others in both contexts. Comments note availability.
7
7
  */
8
8
 
9
- import { bytes } from '.';
9
+ import { bytes } from ".";
10
10
 
11
11
  export {};
12
12
 
@@ -49,7 +49,7 @@ declare global {
49
49
  * sleep(3);
50
50
  * }
51
51
  */
52
- function open(filePath: string, mode: 'b'): ArrayBuffer;
52
+ function open(filePath: string, mode: "b"): ArrayBuffer;
53
53
 
54
54
  // === Init context and VU logic ===
55
55
  // ---------------------------------
k6/html.d.ts CHANGED
File without changes
k6/http.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { bytes, JSONValue } from '.';
2
- import { Selection } from './html';
1
+ import { bytes, JSONValue } from ".";
2
+ import { Selection } from "./html";
3
3
 
4
4
  /**
5
5
  * Make DELETE request.
@@ -212,49 +212,49 @@ export function setResponseCallback(responseCallback: ExpectedStatusesCallback):
212
212
  // === SSL/TLS versions ===
213
213
  // ------------------------
214
214
 
215
- export const SSL_3_0 = 'ssl3.0';
215
+ export const SSL_3_0 = "ssl3.0";
216
216
 
217
- export const TLS_1_0 = 'tls1.0';
217
+ export const TLS_1_0 = "tls1.0";
218
218
 
219
- export const TLS_1_1 = 'tls1.1';
219
+ export const TLS_1_1 = "tls1.1";
220
220
 
221
- export const TLS_1_2 = 'tls1.2';
221
+ export const TLS_1_2 = "tls1.2";
222
222
 
223
- export const TLS_1_3 = 'tls1.3';
223
+ export const TLS_1_3 = "tls1.3";
224
224
 
225
225
  // === OCSP statuses ===
226
226
  // ---------------------
227
227
 
228
- export const OCSP_STATUS_GOOD = 'good';
228
+ export const OCSP_STATUS_GOOD = "good";
229
229
 
230
- export const OCSP_STATUS_REVOKED = 'revoked';
230
+ export const OCSP_STATUS_REVOKED = "revoked";
231
231
 
232
- export const OCSP_STATUS_SERVER_FAILED = 'server_failed';
232
+ export const OCSP_STATUS_SERVER_FAILED = "server_failed";
233
233
 
234
- export const OCSP_STATUS_UNKNOWN = 'unknown';
234
+ export const OCSP_STATUS_UNKNOWN = "unknown";
235
235
 
236
236
  // === OCSP revocation reasons ===
237
237
  // -------------------------------
238
238
 
239
- export const OCSP_REASON_AA_COMPROMISE = 'aa_compromise';
239
+ export const OCSP_REASON_AA_COMPROMISE = "aa_compromise";
240
240
 
241
- export const OCSP_REASON_AFFILIATION_CHANGED = 'affiliation_changed';
241
+ export const OCSP_REASON_AFFILIATION_CHANGED = "affiliation_changed";
242
242
 
243
- export const OCSP_REASON_CA_COMPROMISE = 'ca_compromise';
243
+ export const OCSP_REASON_CA_COMPROMISE = "ca_compromise";
244
244
 
245
- export const OCSP_REASON_CERTIFICATE_HOLD = 'certificate_hold';
245
+ export const OCSP_REASON_CERTIFICATE_HOLD = "certificate_hold";
246
246
 
247
- export const OCSP_REASON_CESSATION_OF_OPERATION = 'cessation_of_operation';
247
+ export const OCSP_REASON_CESSATION_OF_OPERATION = "cessation_of_operation";
248
248
 
249
- export const OCSP_REASON_KEY_COMPROMISE = 'key_compromise';
249
+ export const OCSP_REASON_KEY_COMPROMISE = "key_compromise";
250
250
 
251
- export const OCSP_REASON_PRIVILEGE_WITHDRAWN = 'privilege_withdrawn';
251
+ export const OCSP_REASON_PRIVILEGE_WITHDRAWN = "privilege_withdrawn";
252
252
 
253
- export const OCSP_REASON_REMOVE_FROM_CRL = 'remove_from_crl';
253
+ export const OCSP_REASON_REMOVE_FROM_CRL = "remove_from_crl";
254
254
 
255
- export const OCSP_REASON_SUPERSEDED = 'superseded';
255
+ export const OCSP_REASON_SUPERSEDED = "superseded";
256
256
 
257
- export const OCSP_REASON_UNSPECIFIED = 'unspecified';
257
+ export const OCSP_REASON_UNSPECIFIED = "unspecified";
258
258
 
259
259
  // === Params ===
260
260
  // --------------
@@ -306,12 +306,12 @@ export interface RefinedParams<RT extends ResponseType | undefined> extends Para
306
306
  /**
307
307
  * Request authentication method.
308
308
  */
309
- export type AuthMethod = 'basic' | 'digest' | 'ntlm';
309
+ export type AuthMethod = "basic" | "digest" | "ntlm";
310
310
 
311
311
  /**
312
312
  * Response type.
313
313
  */
314
- export type ResponseType = 'binary' | 'none' | 'text';
314
+ export type ResponseType = "binary" | "none" | "text";
315
315
 
316
316
  /**
317
317
  * Cookie value in request parameters.
@@ -577,37 +577,37 @@ export interface Response {
577
577
  /**
578
578
  * HTTP protocol.
579
579
  */
580
- export type Protocol = 'HTTP/1.0' | 'HTTP/1.1' | 'HTTP/2.0';
580
+ export type Protocol = "HTTP/1.0" | "HTTP/1.1" | "HTTP/2.0";
581
581
 
582
582
  /**
583
583
  * TLS cipher suite.
584
584
  */
585
585
  export type CipherSuite =
586
- | 'TLS_RSA_WITH_RC4_128_SHA'
587
- | 'TLS_RSA_WITH_3DES_EDE_CBC_SHA'
588
- | 'TLS_RSA_WITH_AES_128_CBC_SHA'
589
- | 'TLS_RSA_WITH_AES_128_CBC_SHA256'
590
- | 'TLS_RSA_WITH_AES_256_CBC_SHA'
591
- | 'TLS_RSA_WITH_AES_128_GCM_SHA256'
592
- | 'TLS_RSA_WITH_AES_256_GCM_SHA384'
593
- | 'TLS_ECDHE_RSA_WITH_RC4_128_SHA'
594
- | 'TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA'
595
- | 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA'
596
- | 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256'
597
- | 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA'
598
- | 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256'
599
- | 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384'
600
- | 'TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305'
601
- | 'TLS_ECDHE_ECDSA_WITH_RC4_128_SHA'
602
- | 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA'
603
- | 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256'
604
- | 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA'
605
- | 'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256'
606
- | 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384'
607
- | 'TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305'
608
- | 'TLS_AES_128_GCM_SHA256'
609
- | 'TLS_AES_256_GCM_SHA384'
610
- | 'TLS_CHACHA20_POLY1305_SHA256';
586
+ | "TLS_RSA_WITH_RC4_128_SHA"
587
+ | "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
588
+ | "TLS_RSA_WITH_AES_128_CBC_SHA"
589
+ | "TLS_RSA_WITH_AES_128_CBC_SHA256"
590
+ | "TLS_RSA_WITH_AES_256_CBC_SHA"
591
+ | "TLS_RSA_WITH_AES_128_GCM_SHA256"
592
+ | "TLS_RSA_WITH_AES_256_GCM_SHA384"
593
+ | "TLS_ECDHE_RSA_WITH_RC4_128_SHA"
594
+ | "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA"
595
+ | "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"
596
+ | "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
597
+ | "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"
598
+ | "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
599
+ | "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
600
+ | "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305"
601
+ | "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA"
602
+ | "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"
603
+ | "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"
604
+ | "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"
605
+ | "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
606
+ | "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
607
+ | "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305"
608
+ | "TLS_AES_128_GCM_SHA256"
609
+ | "TLS_AES_256_GCM_SHA384"
610
+ | "TLS_CHACHA20_POLY1305_SHA256";
611
611
 
612
612
  /**
613
613
  * Refined response.
@@ -628,14 +628,10 @@ export type ResponseBody = string | bytes | null;
628
628
  * @template RT - `Params.responseType` value.
629
629
  * @privateRemarks Default type is a union due to depending on program options.
630
630
  */
631
- export type RefinedResponseBody<RT extends ResponseType | undefined> = RT extends 'binary'
632
- ? bytes
633
- : RT extends 'none'
634
- ? null
635
- : RT extends 'text'
636
- ? string
637
- : RT extends undefined
638
- ? string | null
631
+ export type RefinedResponseBody<RT extends ResponseType | undefined> = RT extends "binary" ? bytes
632
+ : RT extends "none" ? null
633
+ : RT extends "text" ? string
634
+ : RT extends undefined ? string | null
639
635
  : never;
640
636
 
641
637
  /**
@@ -793,7 +789,7 @@ export interface ExpectedStatusesObject {
793
789
  * Returned value from http.url method.
794
790
  */
795
791
  interface HttpURL {
796
- __brand: 'http-url';
792
+ __brand: "http-url";
797
793
  }
798
794
 
799
795
  /**
k6/index.d.ts CHANGED
@@ -31,26 +31,26 @@
31
31
  * @packageDocumentation
32
32
  */
33
33
 
34
- import './global'; // Type global environment
34
+ import "./global"; // Type global environment
35
35
 
36
36
  // Expose everything to autoimport
37
- import './crypto';
38
- import './data';
39
- import './encoding';
40
- import './execution';
41
- import './html';
42
- import './http';
43
- import './metrics';
44
- import './options';
45
- import './experimental/browser';
46
- import './experimental/redis';
47
- import './experimental/timers';
48
- import './experimental/tracing';
49
- import './experimental/webcrypto';
50
- import './experimental/websockets';
51
- import './experimental/grpc';
52
- import './ws';
53
- import './net/grpc';
37
+ import "./crypto";
38
+ import "./data";
39
+ import "./encoding";
40
+ import "./execution";
41
+ import "./html";
42
+ import "./http";
43
+ import "./metrics";
44
+ import "./options";
45
+ import "./experimental/browser";
46
+ import "./experimental/redis";
47
+ import "./experimental/timers";
48
+ import "./experimental/tracing";
49
+ import "./experimental/webcrypto";
50
+ import "./experimental/websockets";
51
+ import "./experimental/grpc";
52
+ import "./ws";
53
+ import "./net/grpc";
54
54
 
55
55
  // === Main ===
56
56
  // ------------
k6/metrics.d.ts CHANGED
File without changes
k6/net/grpc.d.ts CHANGED
File without changes
k6/options.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * https://k6.io/docs/using-k6/options/
4
4
  */
5
5
 
6
- import { CipherSuite } from './http';
6
+ import { CipherSuite } from "./http";
7
7
 
8
8
  /**
9
9
  * Program options.
@@ -30,9 +30,9 @@ export interface Options {
30
30
  /** 0, inf, or any time duration(60s, 5m30s, 10m, 2h). */
31
31
  ttl: string;
32
32
 
33
- select: 'first' | 'random' | 'roundRobin';
33
+ select: "first" | "random" | "roundRobin";
34
34
 
35
- policy: 'preferIPv4' | 'preferIPv6' | 'onlyIPv4' | 'onlyIPv6' | 'any';
35
+ policy: "preferIPv4" | "preferIPv6" | "onlyIPv4" | "onlyIPv6" | "any";
36
36
  };
37
37
 
38
38
  /** Test duration. */
@@ -189,13 +189,13 @@ export interface Certificate {
189
189
  }
190
190
 
191
191
  export type ExecutorOptions =
192
- | 'shared-iterations'
193
- | 'per-vu-iterations'
194
- | 'constant-vus'
195
- | 'ramping-vus'
196
- | 'constant-arrival-rate'
197
- | 'ramping-arrival-rate'
198
- | 'externally-controlled';
192
+ | "shared-iterations"
193
+ | "per-vu-iterations"
194
+ | "constant-vus"
195
+ | "ramping-vus"
196
+ | "constant-arrival-rate"
197
+ | "ramping-arrival-rate"
198
+ | "externally-controlled";
199
199
 
200
200
  /**
201
201
  * BaseScenario.
@@ -253,7 +253,7 @@ export abstract class BaseScenario {
253
253
  * https://k6.io/docs/using-k6/scenarios/executors/shared-iterations/
254
254
  */
255
255
  export interface SharedIterationsScenario extends BaseScenario {
256
- executor: 'shared-iterations';
256
+ executor: "shared-iterations";
257
257
  /**
258
258
  * Number of VUs to run concurrently.
259
259
  *
@@ -282,7 +282,7 @@ export interface SharedIterationsScenario extends BaseScenario {
282
282
  * https://k6.io/docs/using-k6/scenarios/executors/per-vu-iterations/
283
283
  */
284
284
  export interface PerVUIterationsScenario extends BaseScenario {
285
- executor: 'per-vu-iterations';
285
+ executor: "per-vu-iterations";
286
286
  /**
287
287
  * Number of VUs to run concurrently.
288
288
  *
@@ -311,7 +311,7 @@ export interface PerVUIterationsScenario extends BaseScenario {
311
311
  * https://k6.io/docs/using-k6/scenarios/executors/constant-vus/
312
312
  */
313
313
  export interface ConstantVUsScenario extends BaseScenario {
314
- executor: 'constant-vus';
314
+ executor: "constant-vus";
315
315
 
316
316
  /**
317
317
  * Number of VUs to run concurrently.
@@ -332,7 +332,7 @@ export interface ConstantVUsScenario extends BaseScenario {
332
332
  * https://k6.io/docs/using-k6/scenarios/executors/ramping-vus/
333
333
  */
334
334
  export interface RampingVUsScenario extends BaseScenario {
335
- executor: 'ramping-vus';
335
+ executor: "ramping-vus";
336
336
 
337
337
  /** Array of objects that specify the number of VUs to ramp up or down to. */
338
338
  stages: Stage[];
@@ -358,7 +358,7 @@ export interface RampingVUsScenario extends BaseScenario {
358
358
  * https://k6.io/docs/using-k6/scenarios/executors/constant-arrival-rate/
359
359
  */
360
360
  export interface ConstantArrivalRateScenario extends BaseScenario {
361
- executor: 'constant-arrival-rate';
361
+ executor: "constant-arrival-rate";
362
362
 
363
363
  /** Total scenario duration (excluding `gracefulStop`) */
364
364
  duration: string;
@@ -390,7 +390,7 @@ export interface ConstantArrivalRateScenario extends BaseScenario {
390
390
  * https://k6.io/docs/using-k6/scenarios/executors/ramping-arrival-rate/
391
391
  */
392
392
  export interface RampingArrivalRateScenario extends BaseScenario {
393
- executor: 'ramping-arrival-rate';
393
+ executor: "ramping-arrival-rate";
394
394
 
395
395
  /** Maximum number of VUs to allow during the test run. */
396
396
  maxVUs?: number;
@@ -418,7 +418,7 @@ export interface RampingArrivalRateScenario extends BaseScenario {
418
418
  * https://k6.io/docs/using-k6/scenarios/executors/externally-controlled/
419
419
  */
420
420
  export interface ExternallyControlledScenario extends BaseScenario {
421
- executor: 'externally-controlled';
421
+ executor: "externally-controlled";
422
422
 
423
423
  /**
424
424
  * Number of VUs to run concurrently.
k6/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/k6",
3
- "version": "0.46.2",
3
+ "version": "0.46.3",
4
4
  "description": "TypeScript definitions for k6",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6",
6
6
  "license": "MIT",
@@ -60,6 +60,6 @@
60
60
  },
61
61
  "scripts": {},
62
62
  "dependencies": {},
63
- "typesPublisherContentHash": "b7636c8ff8ec7685076562d9226af5caab0553c1115277e81d3bbc597bdc4b13",
64
- "typeScriptVersion": "4.3"
63
+ "typesPublisherContentHash": "7adc75fe3ab6a575e652d2a25bba71079e68f3751d3d268561f73356b442c089",
64
+ "typeScriptVersion": "4.5"
65
65
  }
k6/ws.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CookieJar } from './http';
1
+ import { CookieJar } from "./http";
2
2
 
3
3
  /**
4
4
  * Open WebSocket connection.
@@ -190,7 +190,7 @@ export abstract class Socket {
190
190
  /**
191
191
  * Event type.
192
192
  */
193
- export type EventType = 'close' | 'error' | 'message' | 'open' | 'ping' | 'pong' | 'binaryMessage';
193
+ export type EventType = "close" | "error" | "message" | "open" | "ping" | "pong" | "binaryMessage";
194
194
 
195
195
  /**
196
196
  * Timer handler.
@@ -205,20 +205,13 @@ export interface TimerHandler {
205
205
  /**
206
206
  * Event handler. Signature varies with event type.
207
207
  */
208
- export type EventHandler<ET extends EventType> = ET extends 'close'
209
- ? CloseEventHandler
210
- : ET extends 'error'
211
- ? ErrorEventHandler
212
- : ET extends 'message'
213
- ? MessageEventHandler
214
- : ET extends 'binaryMessage'
215
- ? BinaryMessageEventHandler
216
- : ET extends 'open'
217
- ? OpenEventHandler
218
- : ET extends 'ping'
219
- ? PingEventHandler
220
- : ET extends 'pong'
221
- ? PongEventHandler
208
+ export type EventHandler<ET extends EventType> = ET extends "close" ? CloseEventHandler
209
+ : ET extends "error" ? ErrorEventHandler
210
+ : ET extends "message" ? MessageEventHandler
211
+ : ET extends "binaryMessage" ? BinaryMessageEventHandler
212
+ : ET extends "open" ? OpenEventHandler
213
+ : ET extends "ping" ? PingEventHandler
214
+ : ET extends "pong" ? PongEventHandler
222
215
  : never;
223
216
 
224
217
  /**