mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
refactor!: remove duplicate type names (#11803)
This commit is contained in:
parent
f1608743c8
commit
514e2d5241
@ -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();
|
||||
|
@ -165,13 +165,6 @@ export const enum BrowserEvent {
|
||||
TargetDiscovered = 'targetdiscovered',
|
||||
}
|
||||
|
||||
export {
|
||||
/**
|
||||
* @deprecated Use {@link BrowserEvent}.
|
||||
*/
|
||||
BrowserEvent as BrowserEmittedEvents,
|
||||
};
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
|
@ -38,13 +38,6 @@ export const enum BrowserContextEvent {
|
||||
TargetDestroyed = 'targetdestroyed',
|
||||
}
|
||||
|
||||
export {
|
||||
/**
|
||||
* @deprecated Use {@link BrowserContextEvent}
|
||||
*/
|
||||
BrowserContextEvent as BrowserContextEmittedEvents,
|
||||
};
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user