import EventBus, { type ListenerFn } from "../../lib/EventBus"; import type { ParametersAsAllOptional } from "../../lib/types"; export type BroadcastEventFn = (eventName: string, payload: any, stateName: string) => void; export type EventListener = ListenerFn>; export type BroadcastStateChange = (stateName: string, state: (readonly any[])["length"]) => void; export type StateChangeListener = ListenerFn>; export type ShouldUnregister = boolean; export type ListenerRegisterer = (listener: T, shouldUnregister: ShouldUnregister) => void; /** * Broadcast types should be loose */ export declare const _createInternalCompanyProvider: () => { eventBus: EventBus; stateChangeBus: EventBus; }; export type _InternalCompanyProvider = ReturnType; export declare const _getInternalCompanyProvider: () => _InternalCompanyProvider | null; export declare const createCompanyProvider: (_internalCompanyProvider: _InternalCompanyProvider) => { listenEvents: ListenerRegisterer; listenStateChanges: ListenerRegisterer; }; export type CompanyProvider = ReturnType; export declare const getCompanyProvider: () => CompanyProvider | null;