chore: add type test for CommonEventEmitter (#10500)

This commit is contained in:
Nikolay Vitkov 2023-07-03 16:38:33 +02:00 committed by GitHub
parent 0caf124182
commit 15cf3a5e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,16 @@
// eslint-disable-next-line no-restricted-imports
import {EventEmitter as NodeEventEmitter} from 'node:events';
import {CommonEventEmitter, EventEmitter} from 'puppeteer';
import {expectAssignable} from 'tsd';
declare const emitter: EventEmitter;
{
{
expectAssignable<CommonEventEmitter>(new NodeEventEmitter());
}
{
expectAssignable<CommonEventEmitter>(emitter);
}
}