Skip to content

Commit b60cef1

Browse files
committed
declare type definitions on EventBus
To address #54, adjusts the EventBus import to preserve the imported name, while still adding type definitions to the imported object.
1 parent eda1f6a commit b60cef1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/event-bus.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ export interface IEventBus {
1010
dispatch: IDispatch
1111
}
1212

13-
import * as EventBusAny from "eventbusjs"
14-
const EventBus: IEventBus = EventBusAny
13+
import * as EventBus from "eventbusjs"
14+
declare module "eventbusjs" {
15+
interface EventBus extends IEventBus {}
16+
}
1517
export { EventBus }

0 commit comments

Comments
 (0)