fix(runtime-core): add useAttrs and useSlots export (#4053)
This commit is contained in:
parent
2788154f77
commit
735ada1507
@ -58,7 +58,9 @@ export {
|
||||
withAsyncContext,
|
||||
// deprecated
|
||||
defineEmit,
|
||||
useContext
|
||||
useContext,
|
||||
useAttrs,
|
||||
useSlots
|
||||
} from './apiSetupHelpers'
|
||||
|
||||
// Advanced API ----------------------------------------------------------------
|
||||
|
@ -4,6 +4,8 @@ import {
|
||||
defineEmit,
|
||||
defineEmits,
|
||||
useContext,
|
||||
useAttrs,
|
||||
useSlots,
|
||||
withDefaults,
|
||||
Slots,
|
||||
describe
|
||||
@ -134,3 +136,13 @@ describe('useContext', () => {
|
||||
emit('foo')
|
||||
emit('bar')
|
||||
})
|
||||
|
||||
describe('useAttrs', () => {
|
||||
const attrs = useAttrs()
|
||||
expectType<Record<string, unknown>>(attrs)
|
||||
})
|
||||
|
||||
describe('useSlots', () => {
|
||||
const slots = useSlots()
|
||||
expectType<Slots>(slots)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user