Skip to content

Commit

Permalink
types: move exported objects from index.d.ts to overrides.d.ts (micro…
Browse files Browse the repository at this point in the history
…soft#7152)

This way we generate these types right away, without duplicating them everywhere.
  • Loading branch information
dgozman authored Jun 15, 2021
1 parent b74ca36 commit b625a04
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 21 deletions.
7 changes: 0 additions & 7 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,4 @@
* limitations under the License.
*/

import * as types from './types/types';

export * from './types/types';
export const webkit: types.BrowserType;
export const chromium: types.BrowserType;
export const firefox: types.BrowserType;
export const _electron: types.Electron;
export const _android: types.Android;
7 changes: 0 additions & 7 deletions packages/common/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,4 @@
* limitations under the License.
*/

import * as types from './types/types';

export * from './types/types';
export const chromium: types.BrowserType;
export const firefox: types.BrowserType;
export const webkit: types.BrowserType;
export const _electron: types.Electron;
export const _android: types.Android;
7 changes: 0 additions & 7 deletions packages/playwright-test/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,5 @@
* limitations under the License.
*/

import * as types from './types/types';

export * from './types/types';
export const chromium: types.BrowserType;
export const firefox: types.BrowserType;
export const webkit: types.BrowserType;
export const _electron: types.Electron;
export const _android: types.Android;
export * from './types/test';
6 changes: 6 additions & 0 deletions types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7846,6 +7846,12 @@ export type AndroidKey =
'Copy' |
'Paste';

export const chromium: BrowserType;
export const firefox: BrowserType;
export const webkit: BrowserType;
export const _electron: Electron;
export const _android: Android;

// This is required to not export everything by default. See https://github.com/Microsoft/TypeScript/issues/19545#issuecomment-340490459
export {};

Expand Down
6 changes: 6 additions & 0 deletions utils/generate_types/overrides.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,5 +321,11 @@ export type AndroidKey =
'Copy' |
'Paste';

export const chromium: BrowserType;
export const firefox: BrowserType;
export const webkit: BrowserType;
export const _electron: Electron;
export const _android: Android;

// This is required to not export everything by default. See https://github.com/Microsoft/TypeScript/issues/19545#issuecomment-340490459
export {};

0 comments on commit b625a04

Please sign in to comment.