Added type literal for clip shape

Added optional done params
This commit is contained in:
Andrew Lessels
2017-08-23 08:47:48 +10:00
parent 73dd4e148f
commit 18dff7db03
+2 -2
View File
@@ -95,8 +95,8 @@ declare class Nightmare {
removeListener(event: 'prompt', cb: (msg: string, defaultValue?: string) => void): Nightmare;
removeListener(event: 'error', cb: (msg: string, trace?: Nightmare.IStackTrace[]) => void): Nightmare;
removeListener(event: 'timeout', cb: (msg: string) => void): Nightmare;
screenshot(path: string): Nightmare;
screenshot(path: string, clip: Object): Nightmare;
screenshot(path: string, done?: (err: any) => void): Nightmare;
screenshot(path: string, clip?: { x: number, y: number, width: number, height: number }, done?: (err: any) => void): Nightmare;
html(path: string, saveType: string): Nightmare;
html(path: string, saveType: 'HTMLOnly'): Nightmare;
html(path: string, saveType: 'HTMLComplete'): Nightmare;