mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(types): do not use import('electron') (#5572)
This commit is contained in:
parent
8f79b8c175
commit
5cb914b2fe
2
packages/common/index.d.ts
vendored
2
packages/common/index.d.ts
vendored
@ -20,3 +20,5 @@ export * from './types/types';
|
||||
export const chromium: types.BrowserType<types.ChromiumBrowser>;
|
||||
export const firefox: types.BrowserType<types.FirefoxBrowser>;
|
||||
export const webkit: types.BrowserType<types.WebKitBrowser>;
|
||||
export const _electron: types.Electron;
|
||||
export const _android: types.Android;
|
||||
|
||||
@ -108,7 +108,7 @@ function test_typescript_types {
|
||||
"playwright-webkit"
|
||||
do
|
||||
echo "Checking types of ${PKG_NAME}"
|
||||
echo "import { Page } from '${PKG_NAME}';" > "${PKG_NAME}.ts" && tsc "${PKG_NAME}.ts"
|
||||
echo "import { Page } from '${PKG_NAME}';" > "${PKG_NAME}.ts" && npx -p typescript@3.7.5 tsc "${PKG_NAME}.ts"
|
||||
done;
|
||||
|
||||
echo "${FUNCNAME[0]} success"
|
||||
@ -351,7 +351,7 @@ function test_electron_types {
|
||||
echo "import { Page, electron, ElectronApplication, Electron } from 'playwright-electron';" > "test.ts"
|
||||
|
||||
echo "Running tsc"
|
||||
npx tsc "test.ts"
|
||||
npx -p typescript@3.7.5 tsc "test.ts"
|
||||
|
||||
echo "${FUNCNAME[0]} success"
|
||||
}
|
||||
@ -365,7 +365,7 @@ function test_android_types {
|
||||
echo "import { AndroidDevice, android, AndroidWebView, Page } from 'playwright-android';" > "test.ts"
|
||||
|
||||
echo "Running tsc"
|
||||
npx tsc "test.ts"
|
||||
npx -p typescript@3.7.5 tsc "test.ts"
|
||||
|
||||
echo "${FUNCNAME[0]} success"
|
||||
}
|
||||
|
||||
8
types/types.d.ts
vendored
8
types/types.d.ts
vendored
@ -7095,8 +7095,8 @@ export interface ElectronApplication {
|
||||
* @param pageFunction Function to be evaluated in the worker context.
|
||||
* @param arg Optional argument to pass to `pageFunction`.
|
||||
*/
|
||||
evaluate<R, Arg>(pageFunction: PageFunctionOn<typeof import('electron'), Arg, R>, arg: Arg): Promise<R>;
|
||||
evaluate<R>(pageFunction: PageFunctionOn<typeof import('electron'), void, R>, arg?: any): Promise<R>;
|
||||
evaluate<R, Arg>(pageFunction: PageFunctionOn<any, Arg, R>, arg: Arg): Promise<R>;
|
||||
evaluate<R>(pageFunction: PageFunctionOn<any, void, R>, arg?: any): Promise<R>;
|
||||
|
||||
/**
|
||||
* Returns the return value of `pageFunction` as a [JSHandle].
|
||||
@ -7117,8 +7117,8 @@ export interface ElectronApplication {
|
||||
* @param pageFunction Function to be evaluated in the worker context.
|
||||
* @param arg
|
||||
*/
|
||||
evaluateHandle<R, Arg>(pageFunction: PageFunctionOn<typeof import('electron'), Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
|
||||
evaluateHandle<R>(pageFunction: PageFunctionOn<typeof import('electron'), void, R>, arg?: any): Promise<SmartHandle<R>>;
|
||||
evaluateHandle<R, Arg>(pageFunction: PageFunctionOn<any, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
|
||||
evaluateHandle<R>(pageFunction: PageFunctionOn<any, void, R>, arg?: any): Promise<SmartHandle<R>>;
|
||||
/**
|
||||
* This event is issued when the application closes.
|
||||
*/
|
||||
|
||||
8
utils/generate_types/overrides.d.ts
vendored
8
utils/generate_types/overrides.d.ts
vendored
@ -223,11 +223,11 @@ export const selectors: Selectors;
|
||||
export const devices: Devices & DeviceDescriptor[];
|
||||
|
||||
export interface ElectronApplication {
|
||||
evaluate<R, Arg>(pageFunction: PageFunctionOn<typeof import('electron'), Arg, R>, arg: Arg): Promise<R>;
|
||||
evaluate<R>(pageFunction: PageFunctionOn<typeof import('electron'), void, R>, arg?: any): Promise<R>;
|
||||
evaluate<R, Arg>(pageFunction: PageFunctionOn<any, Arg, R>, arg: Arg): Promise<R>;
|
||||
evaluate<R>(pageFunction: PageFunctionOn<any, void, R>, arg?: any): Promise<R>;
|
||||
|
||||
evaluateHandle<R, Arg>(pageFunction: PageFunctionOn<typeof import('electron'), Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
|
||||
evaluateHandle<R>(pageFunction: PageFunctionOn<typeof import('electron'), void, R>, arg?: any): Promise<SmartHandle<R>>;
|
||||
evaluateHandle<R, Arg>(pageFunction: PageFunctionOn<any, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
|
||||
evaluateHandle<R>(pageFunction: PageFunctionOn<any, void, R>, arg?: any): Promise<SmartHandle<R>>;
|
||||
}
|
||||
|
||||
export type AndroidElementInfo = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user