Skip to content

Commit 17f2f61

Browse files
committed
chore(emitMixin): proper typings
Adds typings to `emitMixin`, still in the quest for switching the TS config to `strict`
1 parent 656adc2 commit 17f2f61

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/emitMixin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ export const attachEmitListener = () => {
44
return {
55
beforeCreate() {
66
let events: Record<string, unknown[]> = {}
7-
this.__emitted = events
8-
const originalEmit = getCurrentInstance().emit
9-
getCurrentInstance().emit = (event: string, ...args: unknown[]) => {
7+
;(this as any).__emitted = events
8+
const originalEmit = getCurrentInstance()!.emit
9+
getCurrentInstance()!.emit = (event: string, ...args: unknown[]) => {
1010
events[event]
1111
? (events[event] = [...events[event], [...args]])
1212
: (events[event] = [[...args]])

0 commit comments

Comments
 (0)