( instance: ComponentInternalInstance, event: string, args: any[], )
| 92 | } |
| 93 | |
| 94 | export function emit( |
| 95 | instance: ComponentInternalInstance, |
| 96 | event: string, |
| 97 | args: any[], |
| 98 | ): ComponentPublicInstance | null { |
| 99 | const cbs = getRegistry(instance)[event] |
| 100 | if (cbs) { |
| 101 | callWithAsyncErrorHandling( |
| 102 | cbs.map(cb => cb.bind(instance.proxy)), |
| 103 | instance, |
| 104 | ErrorCodes.COMPONENT_EVENT_HANDLER, |
| 105 | args, |
| 106 | ) |
| 107 | } |
| 108 | return instance.proxy |
| 109 | } |
nothing calls this directly
no test coverage detected