Is nesting interfaces allowed for withDefaults using the composition API? #8772
Unanswered
DanielTate
asked this question in
Help/Questions
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have this question on stackoverflow
https://stackoverflow.com/questions/76650304/using-vue3-composition-api-with-script-setup-and-typescript-is-there-a-way-to
I am using Vue3 Composition API with script setup and typescript for my project. In the docs we are provided this example:
Is there a way to use an interface as a property in the defaults?
I'm very new to typescript so I'm not sure I'm asking the right question. I want to do something like this:
However I am met with an error saying that
DEFAULTS
doesn't match the requirements for withDefaults.Why is this happening and is there any documentation that can lead me in the right direction to fix it?
Here is an interactive example. In this example you can see I have made a function that requires the type
WindowConfig
This tells me the issue lies with Vue not Typescript.Beta Was this translation helpful? Give feedback.
All reactions