chore: update index.d.ts and index.js (#318)

This commit is contained in:
Dmitry Gozman 2019-12-20 12:44:15 -08:00 committed by GitHub
parent a4cb386b70
commit dd6ba432ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 32 deletions

12
index.d.ts vendored
View File

@ -1,9 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import * as chromium from './chromium';
import * as firefox from './firefox';
import * as webkit from './webkit';
declare function pickBrowser(browser: 'chromium'): typeof chromium;
declare function pickBrowser(browser: 'firefox'): typeof firefox;
declare function pickBrowser(browser: 'webkit'): typeof webkit;
export = pickBrowser;
export * from './lib/api';
export function playwright(browser: 'chromium'): import('./lib/api').Chromium;
export function playwright(browser: 'firefox'): import('./lib/api').Firefox;
export function playwright(browser: 'webkit'): import('./lib/api').WebKit;

View File

@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
module.exports = browser => {
module.exports.playwright = browser => {
if (browser === 'chromium')
return require('./chromium');
if (browser === 'firefox')

View File

@ -12,12 +12,8 @@ export { Frame } from './frames';
export { Keyboard, Mouse } from './input';
export { JSHandle } from './javascript';
export { Request, Response } from './network';
export { Page } from './page';
export { Page, FileChooser } from './page';
export * from './chromium/crApi';
export * from './firefox/ffApi';
export * from './webkit/wkApi';
export const Chromium = {};
export const Firefox = {};
export const WebKit = {};

View File

@ -1,15 +1,14 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export { CRBrowser } from './crBrowser';
export { CRSession } from './crConnection';
export { CRPlaywright } from './crPlaywright';
export { CRTarget } from './crTarget';
export { CRAccessibility } from './features/crAccessibility';
export { CRCoverage } from './features/crCoverage';
export { CRInterception } from './features/crInterception';
export { CROverrides } from './features/crOverrides';
export { CRPDF } from './features/crPdf';
export { CRPermissions } from './features/crPermissions';
export { CRWorker, CRWorkers } from './features/crWorkers';
export { CRBrowser as ChromiumBrowser } from './crBrowser';
export { CRSession as ChromiumSession } from './crConnection';
export { CRPlaywright as Chromium } from './crPlaywright';
export { CRTarget as ChromiumTarget } from './crTarget';
export { CRAccessibility as ChromiumAccessibility } from './features/crAccessibility';
export { CRCoverage as ChromiumCoverage } from './features/crCoverage';
export { CRInterception as ChromiumInterception } from './features/crInterception';
export { CROverrides as ChromiumOverrides } from './features/crOverrides';
export { CRPDF as ChromiumPDF } from './features/crPdf';
export { CRPermissions as ChromiumPermissions } from './features/crPermissions';
export { CRWorker as ChromiumWorker, CRWorkers as ChromiumWorkers } from './features/crWorkers';

View File

@ -1,8 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export { FFInterception } from './features/ffInterception';
export { FFPermissions } from './features/ffPermissions';
export { FFBrowser } from './ffBrowser';
export { FFPlaywright } from './ffPlaywright';
export { FFInterception as FirefoxInterception } from './features/ffInterception';
export { FFPermissions as FirefoxPermissions } from './features/ffPermissions';
export { FFBrowser as FirefoxBrowser } from './ffBrowser';
export { FFPlaywright as Firefox } from './ffPlaywright';

View File

@ -1,5 +1,5 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
export { WKBrowser } from './wkBrowser';
export { WKPlaywright } from './wkPlaywright';
export { WKBrowser as WebKitBrowser } from './wkBrowser';
export { WKPlaywright as WebKit } from './wkPlaywright';