Skip to content

Commit

Permalink
fix(types): fix missing expose() type on setup context
Browse files Browse the repository at this point in the history
fix #12660
  • Loading branch information
yyx990803 committed Jul 15, 2022
1 parent 52a5979 commit e0a9546
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions types/test/v3/setup-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ Vue.extend({
}
ctx.emit('foo')
ctx.slots.default && ctx.slots.default()
ctx.expose({
a: 123
})
}
})

Expand Down
1 change: 1 addition & 0 deletions types/v3-setup-context.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ export interface SetupContext<E extends EmitsOptions = {}> {
attrs: Data
slots: Slots
emit: EmitFn<E>
expose(exposed?: Record<string, any>): void
}

0 comments on commit e0a9546

Please sign in to comment.