diff options
Diffstat (limited to 'remote/test/puppeteer/test-d/CommonEventEmitter.test-d.ts')
-rw-r--r-- | remote/test/puppeteer/test-d/CommonEventEmitter.test-d.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/remote/test/puppeteer/test-d/CommonEventEmitter.test-d.ts b/remote/test/puppeteer/test-d/CommonEventEmitter.test-d.ts new file mode 100644 index 0000000000..581b248b8a --- /dev/null +++ b/remote/test/puppeteer/test-d/CommonEventEmitter.test-d.ts @@ -0,0 +1,19 @@ +// eslint-disable-next-line no-restricted-imports +import {EventEmitter as NodeEventEmitter} from 'node:events'; + +import {expectAssignable} from 'tsd'; + +import type {CommonEventEmitter, EventEmitter, EventType} from 'puppeteer'; + +declare const emitter: EventEmitter<Record<EventType, any>>; + +{ + { + expectAssignable<CommonEventEmitter<Record<EventType, any>>>( + new NodeEventEmitter() + ); + } + { + expectAssignable<CommonEventEmitter<Record<EventType, any>>>(emitter); + } +} |