import type { JestEnvironment } from '@jest/environment'; import type { Circus } from '@jest/types'; import type { EnvironmentListener, EnvironmentListenerFn, EnvironmentEventEmitter } from './types'; export * from './types'; export default function WithEmitter(JestEnvironmentClass: new (...args: any[]) => E, callback?: EnvironmentListenerFn, MixinName?: string): WithEmitterClass; export type WithTestEvents = E & { readonly testEvents: EnvironmentEventEmitter; handleTestEvent: Circus.EventHandler; }; export type WithEmitterClass = (new (...args: any[]) => WithTestEvents) & { derive(callback: EnvironmentListener, ClassName?: string): WithEmitterClass; };