diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index 179aa866b..da5f8a714 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -60,7 +60,7 @@ export const enum LifecycleHooks { ERROR_CAPTURED = 'ec' } -type Emit = ((event: string, ...args: unknown[]) => void) +export type Emit = ((event: string, ...args: unknown[]) => void) export interface SetupContext { attrs: Data diff --git a/packages/runtime-core/src/componentProxy.ts b/packages/runtime-core/src/componentProxy.ts index f20caedd0..32dd4edaf 100644 --- a/packages/runtime-core/src/componentProxy.ts +++ b/packages/runtime-core/src/componentProxy.ts @@ -1,4 +1,4 @@ -import { ComponentInternalInstance, Data } from './component' +import { ComponentInternalInstance, Data, Emit } from './component' import { nextTick } from './scheduler' import { instanceWatch } from './apiWatch' import { EMPTY_OBJ, hasOwn, isGloballyWhitelisted } from '@vue/shared' @@ -24,7 +24,7 @@ export type ComponentPublicInstance< $slots: Data $root: ComponentInternalInstance | null $parent: ComponentInternalInstance | null - $emit: (event: string, ...args: unknown[]) => void + $emit: Emit $el: any $options: any $forceUpdate: ReactiveEffect