From 4ed33d295d21eb783c150dbff47c4be34c301485 Mon Sep 17 00:00:00 2001 From: Huan LI Date: Tue, 20 Dec 2016 11:34:45 +0800 Subject: [PATCH] https://github.com/Microsoft/TypeScript/issues/9944 compact selenium-webdriver types v2, hope @types v3 will publish soon --- example/contact-bot.ts | 8 ++++---- src/puppet-web/browser-driver.ts | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/contact-bot.ts b/example/contact-bot.ts index 78576e0e..1d5a2edd 100644 --- a/example/contact-bot.ts +++ b/example/contact-bot.ts @@ -13,10 +13,10 @@ import { createWriteStream } from 'fs' const QrcodeTerminal = require('qrcode-terminal') import { - Config - , Contact - , Wechaty - , log + Config, + Contact, + Wechaty, + log, } from '../' const welcome = ` diff --git a/src/puppet-web/browser-driver.ts b/src/puppet-web/browser-driver.ts index dcb49142..73f37511 100644 --- a/src/puppet-web/browser-driver.ts +++ b/src/puppet-web/browser-driver.ts @@ -376,12 +376,12 @@ export class BrowserDriver { // return this.driver // } - public close() { return this.driver.close() } + public close() { return this.driver.close() as any as Promise } public executeAsyncScript(script: string|Function, ...args: any[]) { return this.driver.executeAsyncScript.apply(this.driver, arguments) } public executeScript (script: string|Function, ...args: any[]) { return this.driver.executeScript.apply(this.driver, arguments) } - public get(url: string) { return this.driver.get(url) } - public getSession() { return this.driver.getSession() } - public manage() { return this.driver.manage() } - public navigate() { return this.driver.navigate() } - public quit() { return this.driver.quit() } + public get(url: string) { return this.driver.get(url) as any as Promise } + public getSession() { return this.driver.getSession() as any as Promise } + public manage() { return this.driver.manage() as any } + public navigate() { return this.driver.navigate() as any } + public quit() { return this.driver.quit() as any as Promise } } -- GitLab