forked from sindresorhus/electron-debug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
67 lines (52 loc) · 1.4 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import {type BrowserWindow} from 'electron';
export type Options = {
/**
Default: [Only in development](https://github.com/sindresorhus/electron-is-dev)
*/
readonly isEnabled?: boolean;
/**
Show DevTools on each created `BrowserWindow`.
@default true
*/
readonly showDevTools?: boolean;
/**
The dock state to open DevTools in.
@default 'previous'
*/
readonly devToolsMode?:
| 'undocked'
| 'right'
| 'bottom'
| 'previous'
| 'detach';
};
/**
Install keyboard shortcuts and optionally activate DevTools on each created `BrowserWindow`.
@example
```
import {app, BrowserWindow} from 'electron';
import debug from 'electron-debug';
debug();
let mainWindow;
(async () => {
await app.whenReady();
mainWindow = new BrowserWindow();
});
```
*/
export default function debug(options?: Options): void;
/**
Reload the specified `BrowserWindow` instance or the focused one.
@param window - Default: `BrowserWindow.getFocusedWindow()`
*/
export function refresh(window?: BrowserWindow): void;
/**
Toggle DevTools for the specified `BrowserWindow` instance or the focused one.
@param window - Default: `BrowserWindow.getFocusedWindow()`
*/
export function developmentTools(window?: BrowserWindow): void;
/**
Open DevTools for the specified `BrowserWindow` instance or the focused one.
@param window - Default: `BrowserWindow.getFocusedWindow()`
*/
export function openDevelopmentTools(window?: BrowserWindow): void;