Replies: 1 comment
-
See #1224. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there!
Currently, vue-tsc forces users to bind boolean prop's default value
:props="false"
. You may mark a prop as optional, but it will cause potential problems withtoRefs
and passing this prop to nested components that expect boolean (not boolean|undefined).As @johnsoncodehk noticed using default value (withDefaults for script setup) will solve this issue, but at this point vue/no-boolean-default enters the game.
In my mind, there is no sense in current Volar's behavior since this problem was disscussed in vuejs/core and resolved by yyx990803 year ago. So boolean props should be false by default without any additional
?:
, withDefaults, etc.Beta Was this translation helpful? Give feedback.
All reactions