types: improve emit type (#345)
This commit is contained in:
parent
67eb29f63b
commit
f85ba092ce
@ -60,7 +60,7 @@ export const enum LifecycleHooks {
|
|||||||
ERROR_CAPTURED = 'ec'
|
ERROR_CAPTURED = 'ec'
|
||||||
}
|
}
|
||||||
|
|
||||||
type Emit = ((event: string, ...args: unknown[]) => void)
|
export type Emit = ((event: string, ...args: unknown[]) => void)
|
||||||
|
|
||||||
export interface SetupContext {
|
export interface SetupContext {
|
||||||
attrs: Data
|
attrs: Data
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ComponentInternalInstance, Data } from './component'
|
import { ComponentInternalInstance, Data, Emit } from './component'
|
||||||
import { nextTick } from './scheduler'
|
import { nextTick } from './scheduler'
|
||||||
import { instanceWatch } from './apiWatch'
|
import { instanceWatch } from './apiWatch'
|
||||||
import { EMPTY_OBJ, hasOwn, isGloballyWhitelisted } from '@vue/shared'
|
import { EMPTY_OBJ, hasOwn, isGloballyWhitelisted } from '@vue/shared'
|
||||||
@ -24,7 +24,7 @@ export type ComponentPublicInstance<
|
|||||||
$slots: Data
|
$slots: Data
|
||||||
$root: ComponentInternalInstance | null
|
$root: ComponentInternalInstance | null
|
||||||
$parent: ComponentInternalInstance | null
|
$parent: ComponentInternalInstance | null
|
||||||
$emit: (event: string, ...args: unknown[]) => void
|
$emit: Emit
|
||||||
$el: any
|
$el: any
|
||||||
$options: any
|
$options: any
|
||||||
$forceUpdate: ReactiveEffect
|
$forceUpdate: ReactiveEffect
|
||||||
|
Loading…
Reference in New Issue
Block a user