Skip to content

Commit 84bd7fc

Browse files
committed
Define type of SpectronWindow from Electron.BrowserWindow
1 parent 2f12d62 commit 84bd7fc

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/spectron.d.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,7 @@ declare module 'spectron' {
118118
): Promise<AccessibilityAuditResult>;
119119
}
120120

121-
type PromisedBrowserWindow = { [P in keyof Electron.BrowserWindow]: Electron.BrowserWindow[P] extends (...args: infer A) => infer R ? (...args: A) => Promise<R> : undefined };
122-
123-
export interface SpectronWindow extends PromisedBrowserWindow {
124-
capturePage(): Promise<Electron.NativeImage>;
125-
}
121+
export type SpectronWindow = { [P in keyof Electron.BrowserWindow]: Electron.BrowserWindow[P] extends (...args: infer A) => infer R ? (...args: A) => Promise<R> : undefined };
126122

127123
export interface SpectronWebContents extends Electron.WebContents {
128124
savePage(

0 commit comments

Comments
 (0)