Skip to content

Commit

Permalink
chore: add type test for CommonEventEmitter (#10500)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightning00Blade committed Jul 3, 2023
1 parent 0caf124 commit 15cf3a5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test-d/CommonEventEmitter.test-d.ts
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit 15cf3a5

Please sign in to comment.