mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-31 11:07:32 +08:00
add constructor options of openDevTools to nightmare.js
This commit is contained in:
9
types/nightmare/index.d.ts
vendored
9
types/nightmare/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Nightmare 1.6.6
|
||||
// Type definitions for Nightmare 2.10.0
|
||||
// Project: https://github.com/segmentio/nightmare
|
||||
// Definitions by: horiuchi <https://github.com/horiuchi>
|
||||
// Sam Yang <https://github.com/samyang-au>
|
||||
@@ -147,6 +147,13 @@ declare namespace Nightmare {
|
||||
typeInterval?: number;
|
||||
x?: number;
|
||||
y?: number;
|
||||
openDevTools?: {
|
||||
/**
|
||||
* Opens the devtools with specified dock state, can be right, bottom, undocked, detach.
|
||||
* https://github.com/electron/electron/blob/master/docs/api/web-contents.md#contentsopendevtoolsoptions
|
||||
*/
|
||||
mode?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest {
|
||||
|
||||
@@ -364,4 +364,6 @@ new Nightmare()
|
||||
new Nightmare()
|
||||
.goto('https://github.com/segmentio/nightmare')
|
||||
.click('a[href="/segmentio/nightmare/archive/master.zip"]')
|
||||
.download('/some/other/path/master.zip');
|
||||
.download('/some/other/path/master.zip');
|
||||
|
||||
new Nightmare({show: true, openDevTools: {mode: 'detach'}});
|
||||
|
||||
Reference in New Issue
Block a user