Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic components fail when used with withDefaults #8331

Closed
rodrigocfd opened this issue May 11, 2023 · 6 comments · Fixed by #8335
Closed

Generic components fail when used with withDefaults #8331

rodrigocfd opened this issue May 11, 2023 · 6 comments · Fixed by #8335

Comments

@rodrigocfd
Copy link

Reproducible example:

<script setup lang="ts" generic="T">
const props = withDefaults(defineProps<{
	modelValue: T;
	title?: string;
}>(), {
	title: 'Hello',
});
</script>

Screenshot of the error:

screenshot

@dicren
Copy link

dicren commented May 12, 2023

It happens to me too!

@an501920078
Copy link

me too!

@jd-solanki
Copy link

reference: #8310

@xiaoxiangmoe
Copy link
Contributor

xiaoxiangmoe commented May 16, 2023

@jd-solanki No, this is a different issue from vuejs/core#8310.

@sodatea sodatea transferred this issue from vuejs/language-tools May 16, 2023
@pikax
Copy link
Member

pikax commented May 16, 2023

@jd-solanki No, this is a different issue from #8310.

@xiaoxiangmoe is the same error as #8310

@xiaoxiangmoe
Copy link
Contributor

@jd-solanki @Anubarak After discussion with pikax, we update demo of #8310 . This is same error now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants