Skip to content

Commit 4ac881c

Browse files
committed
refactor!: rename screen to device
1 parent f766eb9 commit 4ac881c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Inspector.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
CDPNode,
77
CDPClient,
88
InspectOptions,
9-
ScreenSetting,
9+
Device,
1010
RawInspectResult,
1111
ParsedInspectResult,
1212
InspectResult,
@@ -477,8 +477,8 @@ export class Inspector extends EventEmitter {
477477
await this.sendCommand("Overlay.hideHighlight");
478478
}
479479

480-
async setScreen(screen: ScreenSetting): Promise<void> {
481-
await this.sendCommand("Emulation.setDeviceMetricsOverride", screen);
480+
async setDevice(device: Device): Promise<void> {
481+
await this.sendCommand("Emulation.setDeviceMetricsOverride", device);
482482
}
483483

484484
async inspect(

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export type CDPClient = {
3939
off: (event: string, callback: (data: any) => void) => void;
4040
};
4141

42-
export type ScreenSetting = {
42+
export type Device = {
4343
width: number;
4444
height: number;
4545
deviceScaleFactor: number;

0 commit comments

Comments
 (0)