We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello again :)
I'm developing a component, and one thing I've noticed that props are converted to primitives.
So this
Outputs
So seems that property with an interface
someObjectProp: { boolProp: boolean stringProp: 'one' | 'two' | 'three' }
Gets compiled to
someObjectProp: { type: ObjectConstructor; required: true; };
Wondering if this can be improved or is this vue/compiler-sfc limitation? Thanks
The text was updated successfully, but these errors were encountered:
I think this is same to #25.
Sorry, something went wrong.
Right, thanks. Posting the link to the workaround and closing this issue, thanks
Workaround: use JS style props declaration as mentioned here #25 (comment)
A temporary workaround is rollback to js-props: <script setup lang="ts"> import type { PropType } from 'vue' type Props = { color: 'blue' | 'red' | 'purple' } defineProps({ color: String as PropType<Props['color']> }) </script>
A temporary workaround is rollback to js-props:
<script setup lang="ts"> import type { PropType } from 'vue' type Props = { color: 'blue' | 'red' | 'purple' } defineProps({ color: String as PropType<Props['color']> }) </script>
No branches or pull requests
Hello again :)
I'm developing a component, and one thing I've noticed that props are converted to primitives.
So this
Outputs
So seems that property with an interface
Gets compiled to
Wondering if this can be improved or is this vue/compiler-sfc limitation?
Thanks
The text was updated successfully, but these errors were encountered: