From c5bb96210c0bc987f9ab4c784c162d7b537030ce Mon Sep 17 00:00:00 2001 From: Eli Robinson Date: Fri, 21 Sep 2018 11:21:06 -0700 Subject: [PATCH] Update index.d.ts Change pause to actually make ms optional. The documentation states that you can provide zero arguments to suspend the browser indefinitely, but it requires the ms argument, which forces you to provide at least the first argument. --- types/nightwatch/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/nightwatch/index.d.ts b/types/nightwatch/index.d.ts index 8559f73b10..b6930fe90a 100644 --- a/types/nightwatch/index.d.ts +++ b/types/nightwatch/index.d.ts @@ -1220,10 +1220,10 @@ export interface NightwatchAPI { * browser.pause(); * }; * ``` - * @param ms: The number of milliseconds to wait. + * @param ms: Optional - The number of milliseconds to wait. * @param callback: Optional callback function to be called when the command finishes. */ - pause(ms: number, callback?: (result: NightwatchCallbackResult) => void): this; + pause(ms?: number, callback?: (result: NightwatchCallbackResult) => void): this; /** * A simple perform command which allows access to the "api" in a callback. Can be useful if you want to read variables set by other commands.