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
If you do
interface Props { id?: number } const props = withDefaults(defineProps<Props>(), { id: undefined })
if you observer props.id, even though the default is undefined, it will lose it's type and it will always claim to be number.
props.id
number
The text was updated successfully, but these errors were encountered:
This is withDefaults types behavior, please forward to https://github.com/vuejs/core.
withDefaults
Sorry, something went wrong.
No branches or pull requests
If you do
if you observer
props.id
, even though the default is undefined, it will lose it's type and it will always claim to benumber
.The text was updated successfully, but these errors were encountered: