We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9139b0 commit 4275c8cCopy full SHA for 4275c8c
src/emit.ts
@@ -48,7 +48,7 @@ function recordEvent(
48
events: Events,
49
vm: ComponentInternalInstance,
50
event: string,
51
- args: Events[number]
+ args: unknown[]
52
): void {
53
// Functional component wrapper creates a parent component
54
let wrapperVm = vm
@@ -64,4 +64,12 @@ function recordEvent(
64
65
// Record the event message sent by the emit
66
events[cid][event].push(args)
67
+
68
+ if (event.startsWith('update:')) {
69
+ if (args.length !== 1) {
70
+ throw new Error('Two-way bound properties have to emit a single value.' + args.length + ' values given.')
71
+ }
72
73
+ vm.props[event.slice('update:'.length)] = args[0]
74
75
}
0 commit comments