Skip to content

Commit c5f45b5

Browse files
author
Piotr
committed
event bus update
1 parent 5c14758 commit c5f45b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/event_bus.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ type EventCallback = (...args: any[]) => void
55
type EventDefinition = Record<string, any[]>
66

77
// Generic event bus creator function - similar to defineEmits pattern
8-
export function defineEventBus<T extends EventDefinition>(events: T = {} as T) {
8+
export function defineEventBus<T extends EventDefinition>(_: T = {} as T) {
99
// Type for event callbacks mapped to their parameter types
1010
type EventCallbacks = {
11-
[K in keyof T]: (...args: T[K]) => void
11+
[K in keyof T]: EventCallback
1212
}
1313

1414
// Type-safe event listeners storage

0 commit comments

Comments
 (0)