diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index 572daf25..7425056a 100644 --- a/packages/runtime-core/src/index.ts +++ b/packages/runtime-core/src/index.ts @@ -58,7 +58,9 @@ export { withAsyncContext, // deprecated defineEmit, - useContext + useContext, + useAttrs, + useSlots } from './apiSetupHelpers' // Advanced API ---------------------------------------------------------------- diff --git a/test-dts/setupHelpers.test-d.ts b/test-dts/setupHelpers.test-d.ts index dd99b85d..e9a584f4 100644 --- a/test-dts/setupHelpers.test-d.ts +++ b/test-dts/setupHelpers.test-d.ts @@ -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>(attrs) +}) + +describe('useSlots', () => { + const slots = useSlots() + expectType(slots) +})