chore: add type test for CommonEventEmitter (#10500)
This commit is contained in:
parent
0caf124182
commit
15cf3a5e6d
16
test-d/CommonEventEmitter.test-d.ts
Normal file
16
test-d/CommonEventEmitter.test-d.ts
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user