puppeteer/test-d/CommonEventEmitter.test-d.ts

23 lines
506 B
TypeScript
Raw Normal View History

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