@types/k6 0.46.0 → 0.46.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.
- k6/README.md +2 -2
- k6/experimental/browser.d.ts +26 -21
- k6/index.d.ts +2 -0
- k6/package.json +12 -2
k6/README.md
CHANGED
|
@@ -8,9 +8,9 @@ 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: Fri, 18 Aug 2023 18:02:54 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: none
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
16
|
-
These definitions were written by [Mihail Stoykov](https://github.com/MStoykov), [Ivan](https://github.com/codebien), [Théo Crevon](https://github.com/oleiade), [Oleg Bespalov](https://github.com/olegbespalov), [Pepe Cano](https://github.com/ppcano), [Nicole van der Hoeven](https://github.com/nicolevanderhoeven),
|
|
16
|
+
These definitions were written by [Mihail Stoykov](https://github.com/MStoykov), [Ivan](https://github.com/codebien), [Théo Crevon](https://github.com/oleiade), [Oleg Bespalov](https://github.com/olegbespalov), [Pepe Cano](https://github.com/ppcano), [Nicole van der Hoeven](https://github.com/nicolevanderhoeven), [Ankur Agarwal](https://github.com/ankur22), [İnanç Gümüş](https://github.com/inancgumus), and [Daniel Jiménez](https://github.com/ka3de).
|
k6/experimental/browser.d.ts
CHANGED
|
@@ -152,7 +152,7 @@ export type MouseMultiClickOptions = MouseClickOptions & {
|
|
|
152
152
|
clickCount?: number;
|
|
153
153
|
};
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
export interface MouseDownUpOptions {
|
|
156
156
|
/**
|
|
157
157
|
* The mouse button to use during the action.
|
|
158
158
|
* Defaults to `left`.
|
|
@@ -530,10 +530,15 @@ export interface NewBrowserContextOptions {
|
|
|
530
530
|
}
|
|
531
531
|
|
|
532
532
|
/**
|
|
533
|
-
* The `
|
|
534
|
-
* with the actual web browser via Chrome DevTools Protocol (CDP).
|
|
533
|
+
* The `browser` named export is the entry point for all your tests,
|
|
534
|
+
* it interacts with the actual web browser via Chrome DevTools Protocol (CDP).
|
|
535
535
|
*/
|
|
536
|
-
export
|
|
536
|
+
export const browser: Browser;
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* `Browser` represents the main web browser instance.
|
|
540
|
+
*/
|
|
541
|
+
export interface Browser {
|
|
537
542
|
/**
|
|
538
543
|
* Returns the current `BrowserContext`. There is a 1-to-1 mapping between
|
|
539
544
|
* `Browser` and `BrowserContext`. If no `BrowserContext` has been
|
|
@@ -585,7 +590,7 @@ export class Browser {
|
|
|
585
590
|
* `BrowserContext` provides a way to operate multiple independent sessions, with
|
|
586
591
|
* separate pages, cache, and cookies.
|
|
587
592
|
*/
|
|
588
|
-
export
|
|
593
|
+
export interface BrowserContext {
|
|
589
594
|
/**
|
|
590
595
|
* Returns the `Browser` instance that this `BrowserContext` belongs to.
|
|
591
596
|
*/
|
|
@@ -763,7 +768,7 @@ export class BrowserContext {
|
|
|
763
768
|
/**
|
|
764
769
|
* ElementHandle represents an in-page DOM element.
|
|
765
770
|
*/
|
|
766
|
-
export
|
|
771
|
+
export interface ElementHandle extends JSHandle {
|
|
767
772
|
/**
|
|
768
773
|
* Finds an element matching the specified selector in the `ElementHandle`'s subtree.
|
|
769
774
|
* @param selector A selector to query element for.
|
|
@@ -959,7 +964,7 @@ export class ElementHandle extends JSHandle {
|
|
|
959
964
|
/**
|
|
960
965
|
* Frame represents the frame within a page. A page is made up of hierarchy of frames.
|
|
961
966
|
*/
|
|
962
|
-
export
|
|
967
|
+
export interface Frame {
|
|
963
968
|
/**
|
|
964
969
|
* Finds an element matching the specified selector within the `Frame`.
|
|
965
970
|
* @param selector A selector to query element for.
|
|
@@ -1306,7 +1311,7 @@ export class Frame {
|
|
|
1306
1311
|
/**
|
|
1307
1312
|
* JSHandle represents an in-page JavaScript object.
|
|
1308
1313
|
*/
|
|
1309
|
-
export
|
|
1314
|
+
export interface JSHandle<T = any> {
|
|
1310
1315
|
/**
|
|
1311
1316
|
* Returns either `null` or the object handle itself, if the object handle is
|
|
1312
1317
|
* an instance of `ElementHandle`.
|
|
@@ -1326,7 +1331,7 @@ export class JSHandle<T = any> {
|
|
|
1326
1331
|
* @param args The arguments to pass to the page function.
|
|
1327
1332
|
* @returns The return value of `pageFunction`.
|
|
1328
1333
|
*/
|
|
1329
|
-
evaluate<R, Arg>(pageFunction: PageFunction<
|
|
1334
|
+
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): R;
|
|
1330
1335
|
|
|
1331
1336
|
/**
|
|
1332
1337
|
* Evaluates the page function and returns a `JSHandle`.
|
|
@@ -1336,7 +1341,7 @@ export class JSHandle<T = any> {
|
|
|
1336
1341
|
* @param args The arguments to pass to the page function.
|
|
1337
1342
|
* @returns A JSHandle of the return value of `pageFunction`.
|
|
1338
1343
|
*/
|
|
1339
|
-
evaluateHandle<R, Arg>(pageFunction: PageFunction<
|
|
1344
|
+
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): JSHandle<R>;
|
|
1340
1345
|
|
|
1341
1346
|
/**
|
|
1342
1347
|
* Fethes a map with own property names of of the `JSHandle` with their values as
|
|
@@ -1355,7 +1360,7 @@ export class JSHandle<T = any> {
|
|
|
1355
1360
|
/**
|
|
1356
1361
|
* Keyboard provides an API for managing a virtual keyboard.
|
|
1357
1362
|
*/
|
|
1358
|
-
export
|
|
1363
|
+
export interface Keyboard {
|
|
1359
1364
|
/**
|
|
1360
1365
|
* Sends a key down message to a session target.
|
|
1361
1366
|
* A superset of the key values can be found [here](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values).
|
|
@@ -1406,7 +1411,7 @@ export class Keyboard {
|
|
|
1406
1411
|
* - Makes it easier to work with dynamic web pages and SPAs built with Svelte,
|
|
1407
1412
|
* React, Vue, etc.
|
|
1408
1413
|
*/
|
|
1409
|
-
export
|
|
1414
|
+
export interface Locator {
|
|
1410
1415
|
/**
|
|
1411
1416
|
* Mouse click on the chosen element.
|
|
1412
1417
|
* @param options Options to use.
|
|
@@ -1580,7 +1585,7 @@ export class Locator {
|
|
|
1580
1585
|
/**
|
|
1581
1586
|
* Mouse provides an API for managing a virtual mouse.
|
|
1582
1587
|
*/
|
|
1583
|
-
export
|
|
1588
|
+
export interface Mouse {
|
|
1584
1589
|
/**
|
|
1585
1590
|
* Shortcut for `mouse.move(x, y)`, `mouse.down()`, `mouse.up()`.
|
|
1586
1591
|
* @param x The x position.
|
|
@@ -1623,7 +1628,7 @@ export class Mouse {
|
|
|
1623
1628
|
* Page provides methods to interact with a single tab in a running web browser
|
|
1624
1629
|
* instance. One instance of the browser can have many page instances.
|
|
1625
1630
|
*/
|
|
1626
|
-
export
|
|
1631
|
+
export interface Page {
|
|
1627
1632
|
/**
|
|
1628
1633
|
* Activates the browser tab so that it comes into focus and actions can be
|
|
1629
1634
|
* performed against it.
|
|
@@ -3125,9 +3130,9 @@ export class Page {
|
|
|
3125
3130
|
}
|
|
3126
3131
|
|
|
3127
3132
|
/**
|
|
3128
|
-
* Request
|
|
3133
|
+
* Request represents requests which are sent by a page.
|
|
3129
3134
|
*/
|
|
3130
|
-
export
|
|
3135
|
+
export interface Request {
|
|
3131
3136
|
/**
|
|
3132
3137
|
* An object with HTTP headers associated with the request. All header names are
|
|
3133
3138
|
* lower-case.
|
|
@@ -3223,9 +3228,9 @@ export class Request {
|
|
|
3223
3228
|
}
|
|
3224
3229
|
|
|
3225
3230
|
/**
|
|
3226
|
-
* Response
|
|
3231
|
+
* Response represents responses which are received by page.
|
|
3227
3232
|
*/
|
|
3228
|
-
export
|
|
3233
|
+
export interface Response {
|
|
3229
3234
|
/**
|
|
3230
3235
|
* An object with HTTP headers associated with the response. All header names are
|
|
3231
3236
|
* lower-case.
|
|
@@ -3339,7 +3344,7 @@ export class Response {
|
|
|
3339
3344
|
* operates in main-frame CSS pixels relative to the top-left corner of the
|
|
3340
3345
|
* viewport.
|
|
3341
3346
|
*/
|
|
3342
|
-
export
|
|
3347
|
+
export interface Touchscreen {
|
|
3343
3348
|
/**
|
|
3344
3349
|
* Taps on the specified position (`x`,`y`), which internally dispatches a `touchstart` and `touchend` event.
|
|
3345
3350
|
* @param x The x position.
|
|
@@ -3349,9 +3354,9 @@ export class Touchscreen {
|
|
|
3349
3354
|
}
|
|
3350
3355
|
|
|
3351
3356
|
/**
|
|
3352
|
-
* The Worker
|
|
3357
|
+
* The Worker represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API).
|
|
3353
3358
|
*/
|
|
3354
|
-
export
|
|
3359
|
+
export interface Worker {
|
|
3355
3360
|
/**
|
|
3356
3361
|
* Get the URL of the web worker.
|
|
3357
3362
|
* @return The URL of the web worker.
|
k6/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
// Pepe Cano <https://github.com/ppcano>
|
|
8
8
|
// Nicole van der Hoeven <https://github.com/nicolevanderhoeven>
|
|
9
9
|
// Ankur Agarwal <https://github.com/ankur22>
|
|
10
|
+
// İnanç Gümüş <https://github.com/inancgumus>
|
|
11
|
+
// Daniel Jiménez <https://github.com/ka3de>
|
|
10
12
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
11
13
|
// TypeScript Version: 3.9
|
|
12
14
|
|
k6/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/k6",
|
|
3
|
-
"version": "0.46.
|
|
3
|
+
"version": "0.46.2",
|
|
4
4
|
"description": "TypeScript definitions for k6",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,6 +39,16 @@
|
|
|
39
39
|
"name": "Ankur Agarwal",
|
|
40
40
|
"url": "https://github.com/ankur22",
|
|
41
41
|
"githubUsername": "ankur22"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "İnanç Gümüş",
|
|
45
|
+
"url": "https://github.com/inancgumus",
|
|
46
|
+
"githubUsername": "inancgumus"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "Daniel Jiménez",
|
|
50
|
+
"url": "https://github.com/ka3de",
|
|
51
|
+
"githubUsername": "ka3de"
|
|
42
52
|
}
|
|
43
53
|
],
|
|
44
54
|
"main": "",
|
|
@@ -50,6 +60,6 @@
|
|
|
50
60
|
},
|
|
51
61
|
"scripts": {},
|
|
52
62
|
"dependencies": {},
|
|
53
|
-
"typesPublisherContentHash": "
|
|
63
|
+
"typesPublisherContentHash": "b7636c8ff8ec7685076562d9226af5caab0553c1115277e81d3bbc597bdc4b13",
|
|
54
64
|
"typeScriptVersion": "4.3"
|
|
55
65
|
}
|