2023-07-03 14:38:33 +00:00
|
|
|
// eslint-disable-next-line no-restricted-imports
|
|
|
|
import {EventEmitter as NodeEventEmitter} from 'node:events';
|
|
|
|
|
2023-09-21 20:22:38 +00:00
|
|
|
import {expectAssignable} from 'tsd';
|
|
|
|
|
2023-09-15 11:00:20 +00:00
|
|
|
import {
|
|
|
|
type CommonEventEmitter,
|
|
|
|
type EventEmitter,
|
|
|
|
type EventType,
|
|
|
|
} from 'puppeteer';
|
2023-07-03 14:38:33 +00:00
|
|
|
|
2023-09-13 13:47:55 +00:00
|
|
|
declare const emitter: EventEmitter<Record<EventType, any>>;
|
2023-07-03 14:38:33 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
{
|
2023-09-13 13:47:55 +00:00
|
|
|
expectAssignable<CommonEventEmitter<Record<EventType, any>>>(
|
|
|
|
new NodeEventEmitter()
|
|
|
|
);
|
2023-07-03 14:38:33 +00:00
|
|
|
}
|
|
|
|
{
|
2023-09-13 13:47:55 +00:00
|
|
|
expectAssignable<CommonEventEmitter<Record<EventType, any>>>(emitter);
|
2023-07-03 14:38:33 +00:00
|
|
|
}
|
|
|
|
}
|