mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(types): restore electron types (#5574)
This commit is contained in:
parent
841264c94d
commit
180446d20f
11
types/types.d.ts
vendored
11
types/types.d.ts
vendored
@ -7042,6 +7042,9 @@ type AccessibilityNode = {
|
||||
export const selectors: Selectors;
|
||||
export const devices: Devices & DeviceDescriptor[];
|
||||
|
||||
//@ts-ignore this will be any if electron is not installed
|
||||
type ElectronType = typeof import('electron');
|
||||
|
||||
/**
|
||||
* Electron application representation. You can use
|
||||
* [electron.launch([options])](https://playwright.dev/docs/api/class-electron#electronlaunchoptions) to obtain the
|
||||
@ -7095,8 +7098,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<any, Arg, R>, arg: Arg): Promise<R>;
|
||||
evaluate<R>(pageFunction: PageFunctionOn<any, void, R>, arg?: any): Promise<R>;
|
||||
evaluate<R, Arg>(pageFunction: PageFunctionOn<ElectronType, Arg, R>, arg: Arg): Promise<R>;
|
||||
evaluate<R>(pageFunction: PageFunctionOn<ElectronType, void, R>, arg?: any): Promise<R>;
|
||||
|
||||
/**
|
||||
* Returns the return value of `pageFunction` as a [JSHandle].
|
||||
@ -7117,8 +7120,8 @@ export interface ElectronApplication {
|
||||
* @param pageFunction Function to be evaluated in the worker context.
|
||||
* @param arg
|
||||
*/
|
||||
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>>;
|
||||
evaluateHandle<R, Arg>(pageFunction: PageFunctionOn<ElectronType, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
|
||||
evaluateHandle<R>(pageFunction: PageFunctionOn<ElectronType, void, R>, arg?: any): Promise<SmartHandle<R>>;
|
||||
/**
|
||||
* This event is issued when the application closes.
|
||||
*/
|
||||
|
13
utils/generate_types/overrides.d.ts
vendored
13
utils/generate_types/overrides.d.ts
vendored
@ -222,12 +222,15 @@ type AccessibilityNode = {
|
||||
export const selectors: Selectors;
|
||||
export const devices: Devices & DeviceDescriptor[];
|
||||
|
||||
export interface ElectronApplication {
|
||||
evaluate<R, Arg>(pageFunction: PageFunctionOn<any, Arg, R>, arg: Arg): Promise<R>;
|
||||
evaluate<R>(pageFunction: PageFunctionOn<any, void, R>, arg?: any): Promise<R>;
|
||||
//@ts-ignore this will be any if electron is not installed
|
||||
type ElectronType = typeof import('electron');
|
||||
|
||||
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 interface ElectronApplication {
|
||||
evaluate<R, Arg>(pageFunction: PageFunctionOn<ElectronType, Arg, R>, arg: Arg): Promise<R>;
|
||||
evaluate<R>(pageFunction: PageFunctionOn<ElectronType, void, R>, arg?: any): Promise<R>;
|
||||
|
||||
evaluateHandle<R, Arg>(pageFunction: PageFunctionOn<ElectronType, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
|
||||
evaluateHandle<R>(pageFunction: PageFunctionOn<ElectronType, void, R>, arg?: any): Promise<SmartHandle<R>>;
|
||||
}
|
||||
|
||||
export type AndroidElementInfo = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user