fix(types): fix missing expose() type on setup context

fix #12660
This commit is contained in:
Evan You 2022-07-15 16:58:01 +08:00
parent 52a59790a5
commit e0a9546ef3
2 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,9 @@ Vue.extend({
}
ctx.emit('foo')
ctx.slots.default && ctx.slots.default()
ctx.expose({
a: 123
})
}
})

View File

@ -33,4 +33,5 @@ export interface SetupContext<E extends EmitsOptions = {}> {
attrs: Data
slots: Slots
emit: EmitFn<E>
expose(exposed?: Record<string, any>): void
}