[@vue/compiler-sfc] Failed to resolve extends base type. #767
-
Hey guys! I'm trying to create a wrapper for <template>
<div>
<AccordionRoot v-bind="delegatedProps" :class="cn('text-gray-700', props.class)">
<slot></slot>
</AccordionRoot>
</div>
</template>
<script setup lang="ts">
import { AccordionRoot, type AccordionRootProps } from 'radix-vue';
import { type HtmlHTMLAttributes, computed } from 'vue'
import { cn } from '~/lib/utils';
interface Props extends AccordionRootProps {
class?: string
}
const props = withDefaults(defineProps<Props>(), {})
console.log(props)
const delegatedProps = computed(() => {
const {class: _, ...delegatedProps} = props
return delegatedProps
})
</script>
This code throws the error:
Here's a link to repro: https://stackblitz.com/edit/nuxt-starter-khh4kd?file=components%2FAccordion%2FRoot.vue. It also throws this error. What am I doing wrong? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
zernonia
Mar 19, 2024
Replies: 1 comment 2 replies
-
You need to install https://stackblitz.com/edit/nuxt-starter-qrfh9f?file=package.json |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
bogdan0083
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to install
typescript
as depshttps://stackblitz.com/edit/nuxt-starter-qrfh9f?file=package.json