@types/k6 1.3.0 → 1.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.
- k6/README.md +1 -1
- k6/browser/index.d.ts +133 -0
- 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,
|
|
11
|
+
* Last updated: Tue, 07 Oct 2025 08:04:38 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
k6/browser/index.d.ts
CHANGED
|
@@ -414,6 +414,139 @@ export interface ElementStateFilter {
|
|
|
414
414
|
state?: ElementState;
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
+
/**
|
|
418
|
+
* The `devices` named export defines emulation settings for many end-user
|
|
419
|
+
* devices that can be used to simulate browser behavior on a mobile device.
|
|
420
|
+
*
|
|
421
|
+
* @example
|
|
422
|
+
* ```js
|
|
423
|
+
* import { browser, devices } from 'k6/browser';
|
|
424
|
+
* ... // redacted
|
|
425
|
+
* const iphoneX = devices['iPhone X'];
|
|
426
|
+
* const context = await browser.newContext(iphoneX);
|
|
427
|
+
* ... // redacted
|
|
428
|
+
* ```
|
|
429
|
+
*/
|
|
430
|
+
export const devices: Record<
|
|
431
|
+
| "Blackberry PlayBook"
|
|
432
|
+
| "Blackberry PlayBook landscape"
|
|
433
|
+
| "BlackBerry Z30"
|
|
434
|
+
| "BlackBerry Z30 landscape"
|
|
435
|
+
| "Galaxy Note 3"
|
|
436
|
+
| "Galaxy Note 3 landscape"
|
|
437
|
+
| "Galaxy Note II"
|
|
438
|
+
| "Galaxy Note II landscape"
|
|
439
|
+
| "Galaxy S III"
|
|
440
|
+
| "Galaxy S III landscape"
|
|
441
|
+
| "Galaxy S5"
|
|
442
|
+
| "Galaxy S5 landscape"
|
|
443
|
+
| "iPad"
|
|
444
|
+
| "iPad landscape"
|
|
445
|
+
| "iPad Mini"
|
|
446
|
+
| "iPad Mini landscape"
|
|
447
|
+
| "iPad Pro"
|
|
448
|
+
| "iPad Pro landscape"
|
|
449
|
+
| "iPhone 4"
|
|
450
|
+
| "iPhone 4 landscape"
|
|
451
|
+
| "iPhone 5"
|
|
452
|
+
| "iPhone 5 landscape"
|
|
453
|
+
| "iPhone 6"
|
|
454
|
+
| "iPhone 6 landscape"
|
|
455
|
+
| "iPhone 6 Plus"
|
|
456
|
+
| "iPhone 6 Plus landscape"
|
|
457
|
+
| "iPhone 7"
|
|
458
|
+
| "iPhone 7 landscape"
|
|
459
|
+
| "iPhone 7 Plus"
|
|
460
|
+
| "iPhone 7 Plus landscape"
|
|
461
|
+
| "iPhone 8"
|
|
462
|
+
| "iPhone 8 landscape"
|
|
463
|
+
| "iPhone 8 Plus"
|
|
464
|
+
| "iPhone 8 Plus landscape"
|
|
465
|
+
| "iPhone SE"
|
|
466
|
+
| "iPhone SE landscape"
|
|
467
|
+
| "iPhone X"
|
|
468
|
+
| "iPhone X landscape"
|
|
469
|
+
| "iPhone XR"
|
|
470
|
+
| "iPhone XR landscape"
|
|
471
|
+
| "JioPhone 2"
|
|
472
|
+
| "JioPhone 2 landscape"
|
|
473
|
+
| "Kindle Fire HDX"
|
|
474
|
+
| "Kindle Fire HDX landscape"
|
|
475
|
+
| "LG Optimus L70"
|
|
476
|
+
| "LG Optimus L70 landscape"
|
|
477
|
+
| "Microsoft Lumia 550"
|
|
478
|
+
| "Microsoft Lumia 950"
|
|
479
|
+
| "Microsoft Lumia 950 landscape"
|
|
480
|
+
| "Nexus 10"
|
|
481
|
+
| "Nexus 10 landscape"
|
|
482
|
+
| "Nexus 4"
|
|
483
|
+
| "Nexus 4 landscape"
|
|
484
|
+
| "Nexus 5"
|
|
485
|
+
| "Nexus 5 landscape"
|
|
486
|
+
| "Nexus 5X"
|
|
487
|
+
| "Nexus 5X landscape"
|
|
488
|
+
| "Nexus 6"
|
|
489
|
+
| "Nexus 6 landscape"
|
|
490
|
+
| "Nexus 6P"
|
|
491
|
+
| "Nexus 6P landscape"
|
|
492
|
+
| "Nexus 7"
|
|
493
|
+
| "Nexus 7 landscape"
|
|
494
|
+
| "Nokia Lumia 520"
|
|
495
|
+
| "Nokia Lumia 520 landscape"
|
|
496
|
+
| "Nokia N9"
|
|
497
|
+
| "Nokia N9 landscape"
|
|
498
|
+
| "Pixel 2"
|
|
499
|
+
| "Pixel 2 landscape"
|
|
500
|
+
| "Pixel 2 XL"
|
|
501
|
+
| "Pixel 2 XL landscape",
|
|
502
|
+
Device
|
|
503
|
+
>;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Device represents an end-user device (computer, tablet, phone etc.).
|
|
507
|
+
*/
|
|
508
|
+
export interface Device {
|
|
509
|
+
/**
|
|
510
|
+
* Name of the device.
|
|
511
|
+
*/
|
|
512
|
+
name: string;
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* User agent of the device.
|
|
516
|
+
*/
|
|
517
|
+
userAgent: string;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Viewport size of the device.
|
|
521
|
+
*/
|
|
522
|
+
viewport: {
|
|
523
|
+
/**
|
|
524
|
+
* page width in pixels.
|
|
525
|
+
*/
|
|
526
|
+
width: number;
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* page height in pixels.
|
|
530
|
+
*/
|
|
531
|
+
height: number;
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Device viewport scale factor.
|
|
536
|
+
*/
|
|
537
|
+
deviceScaleFactor: number;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Indicates whether the device is a mobile device.
|
|
541
|
+
*/
|
|
542
|
+
isMobile: boolean;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Indicates whether the device support touch events.
|
|
546
|
+
*/
|
|
547
|
+
hasTouch: boolean;
|
|
548
|
+
}
|
|
549
|
+
|
|
417
550
|
/**
|
|
418
551
|
* BrowserPermissions defines all the possible permissions that can be granted
|
|
419
552
|
* to the browser application.
|
k6/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/k6",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.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",
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
"scripts": {},
|
|
75
75
|
"dependencies": {},
|
|
76
76
|
"peerDependencies": {},
|
|
77
|
-
"typesPublisherContentHash": "
|
|
77
|
+
"typesPublisherContentHash": "4e3d691be26c1b5fe506bd632f40bf102f9cde3dd34525430b19487481e24b56",
|
|
78
78
|
"typeScriptVersion": "5.2"
|
|
79
79
|
}
|