puppeteer/test-d/CommonEventEmitter.test-d.ts

25 lines
577 B
TypeScript
Raw Normal View History

/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
// 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';
2023-09-13 13:47:55 +00:00
declare const emitter: EventEmitter<Record<EventType, any>>;
{
{
2023-09-13 13:47:55 +00:00
expectAssignable<CommonEventEmitter<Record<EventType, any>>>(
new NodeEventEmitter()
);
}
{
2023-09-13 13:47:55 +00:00
expectAssignable<CommonEventEmitter<Record<EventType, any>>>(emitter);
}
}