typescript is great
This commit is contained in:
parent
7850a70e19
commit
237cbe9603
|
|
@ -50,7 +50,7 @@ export class Chromium implements BrowserType {
|
||||||
}
|
}
|
||||||
|
|
||||||
async launch(options?: LaunchOptions & { slowMo?: number }): Promise<CRBrowser> {
|
async launch(options?: LaunchOptions & { slowMo?: number }): Promise<CRBrowser> {
|
||||||
if (options && options.userDataDir)
|
if (options && (options as any).userDataDir)
|
||||||
throw new Error('userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistent` instead');
|
throw new Error('userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistent` instead');
|
||||||
const { browserServer, transport } = await this._launchServer(options, 'local');
|
const { browserServer, transport } = await this._launchServer(options, 'local');
|
||||||
const browser = await CRBrowser.connect(transport!, options && options.slowMo);
|
const browser = await CRBrowser.connect(transport!, options && options.slowMo);
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ export class Firefox implements BrowserType {
|
||||||
}
|
}
|
||||||
|
|
||||||
async launch(options?: LaunchOptions & { slowMo?: number }): Promise<FFBrowser> {
|
async launch(options?: LaunchOptions & { slowMo?: number }): Promise<FFBrowser> {
|
||||||
if (options && options.userDataDir)
|
if (options && (options as any).userDataDir)
|
||||||
throw new Error('userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistent` instead');
|
throw new Error('userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistent` instead');
|
||||||
const { browserServer, transport } = await this._launchServer(options, 'local');
|
const { browserServer, transport } = await this._launchServer(options, 'local');
|
||||||
const browser = await FFBrowser.connect(transport!, options && options.slowMo);
|
const browser = await FFBrowser.connect(transport!, options && options.slowMo);
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ export class WebKit implements BrowserType {
|
||||||
}
|
}
|
||||||
|
|
||||||
async launch(options?: LaunchOptions & { slowMo?: number }): Promise<WKBrowser> {
|
async launch(options?: LaunchOptions & { slowMo?: number }): Promise<WKBrowser> {
|
||||||
if (options && options.userDataDir)
|
if (options && (options as any).userDataDir)
|
||||||
throw new Error('userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistent` instead');
|
throw new Error('userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistent` instead');
|
||||||
const { browserServer, transport } = await this._launchServer(options, 'local');
|
const { browserServer, transport } = await this._launchServer(options, 'local');
|
||||||
const browser = await WKBrowser.connect(transport!, options && options.slowMo);
|
const browser = await WKBrowser.connect(transport!, options && options.slowMo);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue