diff --git a/lib/globals.d.ts b/lib/globals.d.ts index c5042600..f1d00aca 100644 --- a/lib/globals.d.ts +++ b/lib/globals.d.ts @@ -1,5 +1,14 @@ +import type { EventBus } from './EventBus.ts' + declare global { const __pkg_version: string + + interface Window { + OC: { + _eventBus?: EventBus + } + _nc_event_bus?: EventBus + } } export {} diff --git a/lib/index.ts b/lib/index.ts index 70999f2c..b5d9ce35 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -11,15 +11,6 @@ export type { Event, NextcloudEvents } from './Event' export { ProxyBus } from './ProxyBus' export { SimpleBus } from './SimpleBus' -declare global { - interface Window { - OC: { - _eventBus?: EventBus - } - _nc_event_bus?: EventBus - } -} - let bus: EventBus | null = null /**