fix: mitt types should not be exported (#11371)

This commit is contained in:
Alex Rudenko 2023-11-13 13:27:17 +01:00 committed by GitHub
parent 47b46e7722
commit 4bf2a09a13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 100 additions and 90 deletions

View File

@ -178,6 +178,7 @@ sidebar_label: API
| [EvaluateFunc](./puppeteer.evaluatefunc.md) | |
| [EvaluateFuncWith](./puppeteer.evaluatefuncwith.md) | |
| [EventsWithWildcard](./puppeteer.eventswithwildcard.md) | |
| [EventType](./puppeteer.eventtype.md) | |
| [ExperimentsConfiguration](./puppeteer.experimentsconfiguration.md) | <p>Defines experiment options for Puppeteer.</p><p>See individual properties for more information.</p> |
| [FlattenHandle](./puppeteer.flattenhandle.md) | |
| [HandleFor](./puppeteer.handlefor.md) | |

View File

@ -10,7 +10,7 @@ sidebar_label: BrowserContextEvents
export interface BrowserContextEvents extends Record<EventType, unknown>
```
**Extends:** Record&lt;EventType, unknown&gt;
**Extends:** Record&lt;[EventType](./puppeteer.eventtype.md), unknown&gt;
## Properties

View File

@ -10,7 +10,7 @@ sidebar_label: BrowserEvents
export interface BrowserEvents extends Record<EventType, unknown>
```
**Extends:** Record&lt;EventType, unknown&gt;
**Extends:** Record&lt;[EventType](./puppeteer.eventtype.md), unknown&gt;
## Properties

View File

@ -10,7 +10,7 @@ sidebar_label: CDPSessionEvents
export interface CDPSessionEvents extends CDPEvents, Record<EventType, unknown>
```
**Extends:** [CDPEvents](./puppeteer.cdpevents.md), Record&lt;EventType, unknown&gt;
**Extends:** [CDPEvents](./puppeteer.cdpevents.md), Record&lt;[EventType](./puppeteer.eventtype.md), unknown&gt;
## Properties

View File

@ -12,3 +12,5 @@ export type EventsWithWildcard<Events extends Record<EventType, unknown>> =
'*': Events[keyof Events];
};
```
**References:** [EventType](./puppeteer.eventtype.md)

View File

@ -0,0 +1,11 @@
---
sidebar_label: EventType
---
# EventType type
#### Signature:
```typescript
export type EventType = string | symbol;
```

View File

@ -10,4 +10,4 @@ sidebar_label: FrameEvents
export interface FrameEvents extends Record<EventType, unknown>
```
**Extends:** Record&lt;EventType, unknown&gt;
**Extends:** Record&lt;[EventType](./puppeteer.eventtype.md), unknown&gt;

View File

@ -10,7 +10,7 @@ sidebar_label: LocatorEvents
export interface LocatorEvents extends Record<EventType, unknown>
```
**Extends:** Record&lt;EventType, unknown&gt;
**Extends:** Record&lt;[EventType](./puppeteer.eventtype.md), unknown&gt;
## Properties

View File

@ -14,7 +14,7 @@ See [PageEvent](./puppeteer.pageevent.md) for more detail on the events and when
export interface PageEvents extends Record<EventType, unknown>
```
**Extends:** Record&lt;EventType, unknown&gt;
**Extends:** Record&lt;[EventType](./puppeteer.eventtype.md), unknown&gt;
## Properties

View File

@ -12,7 +12,7 @@ This class represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web
export declare class WebWorker extends EventEmitter<Record<EventType, unknown>>
```
**Extends:** [EventEmitter](./puppeteer.eventemitter.md)&lt;Record&lt;EventType, unknown&gt;&gt;
**Extends:** [EventEmitter](./puppeteer.eventemitter.md)&lt;Record&lt;[EventType](./puppeteer.eventtype.md), unknown&gt;&gt;
## Remarks

View File

@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type {EventType} from '../../../third_party/mitt/mitt.js';
import type {
Observable,
OperatorFunction,
@ -41,6 +40,7 @@ import {
raceWith,
tap,
} from '../../../third_party/rxjs/rxjs.js';
import type {EventType} from '../../common/EventEmitter.js';
import {EventEmitter} from '../../common/EventEmitter.js';
import type {Awaitable, HandleFor, NodeFor} from '../../common/types.js';
import {debugError, timeout} from '../../common/util.js';

View File

@ -17,16 +17,13 @@
import mitt, {
type Emitter,
type EventHandlerMap,
type EventType,
} from '../../third_party/mitt/mitt.js';
import {disposeSymbol} from '../util/disposable.js';
export type {
/**
* @public
*/
EventType,
} from '../../third_party/mitt/mitt.js';
/**
* @public
*/
export type EventType = string | symbol;
/**
* @public

View File

@ -371,6 +371,12 @@
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler waitForSelector (aria) should throw when frame is detached",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[autofill.spec] *",
"platforms": ["darwin", "linux", "win32"],
@ -845,6 +851,54 @@
"parameters": ["cdp", "firefox"],
"expectations": ["SKIP"]
},
{
"testIdPattern": "[oopif.spec] OOPIF clickablePoint, boundingBox, boxModel should work for elements inside OOPIFs",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should provide access to elements",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should support evaluating in oop iframes",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should support frames within OOP frames",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should support frames within OOP iframes",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should track navigations within OOP iframes",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should treat OOP iframes and normal iframes the same",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF waitForFrame should resolve immediately if the frame already exists",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[page.spec] Page BrowserContext.overridePermissions should be prompt by default",
"platforms": ["darwin", "linux", "win32"],
@ -971,6 +1025,12 @@
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[page.spec] Page Page.setUserAgent *",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["chrome", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[page.spec] Page Page.title should return the page title",
"platforms": ["darwin", "linux", "win32"],
@ -1157,6 +1217,18 @@
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[target.spec] Target should report when a new page is created and closed",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[target.spec] Target should report when a target url changes",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[TargetManager.spec] *",
"platforms": ["darwin", "linux", "win32"],
@ -1241,12 +1313,6 @@
"parameters": ["chrome", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[ariaqueryhandler.spec] AriaQueryHandler waitForSelector (aria) should throw when frame is detached",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[bfcache.spec] BFCache can navigate to a BFCached page containing an OOPIF and a worker",
"platforms": ["darwin", "linux", "win32"],
@ -2682,34 +2748,9 @@
"expectations": ["FAIL"]
},
{
"testIdPattern": "[oopif.spec] OOPIF clickablePoint, boundingBox, boxModel should work for elements inside OOPIFs",
"testIdPattern": "[oopif.spec] OOPIF should keep track of a frames OOP state",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should provide access to elements",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should support evaluating in oop iframes",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should support frames within OOP frames",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should support frames within OOP iframes",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
@ -2724,24 +2765,6 @@
"parameters": ["cdp", "chrome"],
"expectations": ["PASS", "TIMEOUT"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should track navigations within OOP iframes",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should treat OOP iframes and normal iframes the same",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF waitForFrame should resolve immediately if the frame already exists",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[page.spec] Page \"after all\" hook in \"Page\"",
"platforms": ["darwin", "linux", "win32"],
@ -3432,12 +3455,6 @@
"parameters": ["cdp", "firefox"],
"expectations": ["SKIP"]
},
{
"testIdPattern": "[target.spec] Target should report when a new page is created and closed",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[target.spec] Target should report when a service worker is created and destroyed",
"platforms": ["darwin", "linux", "win32"],
@ -3701,23 +3718,5 @@
"platforms": ["darwin", "linux", "win32"],
"parameters": ["cdp", "chrome", "headless"],
"expectations": ["FAIL", "PASS"]
},
{
"testIdPattern": "[page.spec] Page Page.setUserAgent *",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["chrome", "webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[target.spec] Target should report when a target url changes",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["webDriverBiDi"],
"expectations": ["PASS"]
},
{
"testIdPattern": "[oopif.spec] OOPIF should keep track of a frames OOP state",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["firefox", "webDriverBiDi"],
"expectations": ["PASS"]
}
]