types(runtime-core): default SetupContext generic argument to EmitsOptions (#1584)
This commit is contained in:
@@ -7,7 +7,9 @@ import {
|
||||
createApp,
|
||||
expectError,
|
||||
expectType,
|
||||
ComponentPublicInstance
|
||||
ComponentPublicInstance,
|
||||
ComponentOptions,
|
||||
SetupContext
|
||||
} from './index'
|
||||
|
||||
describe('with object props', () => {
|
||||
@@ -684,3 +686,10 @@ describe('emits', () => {
|
||||
instance.$emit('test', 1)
|
||||
instance.$emit('test')
|
||||
})
|
||||
|
||||
describe('componentOptions setup should be `SetupContext`', () => {
|
||||
expect<ComponentOptions['setup']>({} as (
|
||||
props: Record<string, any>,
|
||||
ctx: SetupContext
|
||||
) => any)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user