From 15cf3a5e6d1d9be44cca4a040293f55c07ca342a Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com> Date: Mon, 3 Jul 2023 16:38:33 +0200 Subject: [PATCH] chore: add type test for CommonEventEmitter (#10500) --- test-d/CommonEventEmitter.test-d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test-d/CommonEventEmitter.test-d.ts diff --git a/test-d/CommonEventEmitter.test-d.ts b/test-d/CommonEventEmitter.test-d.ts new file mode 100644 index 00000000000..cea44566054 --- /dev/null +++ b/test-d/CommonEventEmitter.test-d.ts @@ -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(new NodeEventEmitter()); + } + { + expectAssignable(emitter); + } +}