Skip to content

Commit b4a1e29

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 ba95295 commit b4a1e29

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/event-bus.ts

Lines changed: 4 additions & 2 deletions
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)