You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
If I have a component with a bindable prop
value: string | number | undefined
and use this component and give it avalue: string
as follows:<component bind:value />
This was OK until recently, but now I get Typescript error in VS code as
string | number | undefined
cannot be bound to astring
.I can fix this by with:
<component bind:value={value as string} />
But this is long-winded and need to be done 1000's of times.
Is there any other solution?
Beta Was this translation helpful? Give feedback.
All reactions