refactor!: remove duplicate type names (#11803)

This commit is contained in:
Nikolay Vitkov 2024-02-02 13:22:47 +01:00 committed by GitHub
parent f1608743c8
commit 514e2d5241
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 3 additions and 43 deletions

View File

@ -160,7 +160,7 @@ Currently, locators support a single event that notifies you when the locator is
let willClick = false;
await page
.locator('button')
.on(LocatorEmittedEvents.Action, () => {
.on(LocatorEvent.Action, () => {
willClick = true;
})
.click();

View File

@ -165,13 +165,6 @@ export const enum BrowserEvent {
TargetDiscovered = 'targetdiscovered',
}
export {
/**
* @deprecated Use {@link BrowserEvent}.
*/
BrowserEvent as BrowserEmittedEvents,
};
/**
* @public
*/

View File

@ -38,13 +38,6 @@ export const enum BrowserContextEvent {
TargetDestroyed = 'targetdestroyed',
}
export {
/**
* @deprecated Use {@link BrowserContextEvent}
*/
BrowserContextEvent as BrowserContextEmittedEvents,
};
/**
* @public
*/

View File

@ -484,15 +484,6 @@ export const enum PageEvent {
WorkerDestroyed = 'workerdestroyed',
}
export {
/**
* All the events that a page instance may emit.
*
* @deprecated Use {@link PageEvent}.
*/
PageEvent as PageEmittedEvents,
};
/**
* Denotes the objects received by callback functions for page events.
*
@ -523,13 +514,6 @@ export interface PageEvents extends Record<EventType, unknown> {
[PageEvent.WorkerDestroyed]: WebWorker;
}
export type {
/**
* @deprecated Use {@link PageEvents}.
*/
PageEvents as PageEventObject,
};
/**
* @public
*/

View File

@ -109,24 +109,14 @@ export enum LocatorEvent {
*/
Action = 'action',
}
export {
/**
* @deprecated Use {@link LocatorEvent}.
*/
LocatorEvent as LocatorEmittedEvents,
};
/**
* @public
*/
export interface LocatorEvents extends Record<EventType, unknown> {
[LocatorEvent.Action]: undefined;
}
export type {
/**
* @deprecated Use {@link LocatorEvents}.
*/
LocatorEvents as LocatorEventObject,
};
/**
* Locators describe a strategy of locating objects and performing an action on
* them. If the action fails because the object is not ready for the action, the