We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Vetur: Restart VLS
Using vue 3 and typescript
Error with default value
No Error when omitting the default value
The text was updated successfully, but these errors were encountered:
You can try to define define a return type on your default. Ref: vuejs/vue#8679
We believe the same happens in vue 3. Docs: https://v3.vuejs.org/guide/typescript-support.html#annotating-return-types
Sorry, something went wrong.
Thank you.
Using both PropType and an arrow function resolves the error message.
PropType
props: { elements: { type: Array as PropType<Element[]>, default: () => { return [] }, }, },
No branches or pull requests
Vetur: Restart VLS
Info
Problem
Using vue 3 and typescript
Error with default value

No Error when omitting the default value

Reproducible Case
The text was updated successfully, but these errors were encountered: