import { OnModuleDestroy } from '@nestjs/common'; import { Observable } from 'rxjs'; import { PickerEvent } from './picker-event'; import { Type } from "@pickerjs/common/lib/shared-types"; export declare type EventHandler = (event: T) => void; export declare type UnsubscribeFn = () => void; export declare class EventBus implements OnModuleDestroy { private subscriberMap; private eventStream; private destroy$; /** * @description * 发布任何订阅者都可以响应的事件。 * @param event */ publish(event: T): void; /** * @description * 返回给定类型的RxJS可观察事件流。 */ ofType(type: Type): Observable; /** @internal */ onModuleDestroy(): any; }