Skip to content

Commit e0a9546

Browse files
committed
fix(types): fix missing expose() type on setup context
fix #12660
1 parent 52a5979 commit e0a9546

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

types/test/v3/setup-test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Vue.extend({
2828
}
2929
ctx.emit('foo')
3030
ctx.slots.default && ctx.slots.default()
31+
ctx.expose({
32+
a: 123
33+
})
3134
}
3235
})
3336

types/v3-setup-context.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ export interface SetupContext<E extends EmitsOptions = {}> {
3333
attrs: Data
3434
slots: Slots
3535
emit: EmitFn<E>
36+
expose(exposed?: Record<string, any>): void
3637
}

0 commit comments

Comments
 (0)