Replies: 2 comments 1 reply
-
Create idea! The next v1 RC version will support it! 🚀 |
Beta Was this translation helpful? Give feedback.
1 reply
-
Valibot v1.0.0-rc.2 is available |
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
-
Would it be possible for the
readonly
action to convert aMap
to aReadonlyMap
? It currently produces aReadonly<Map>
, which makes all the properties of theMap
readonly
, so I couldn't, for example, modify theclear
method, but I could still call theclear
method without receiving a TypeScript error.Here's some example code (also available in the Valibot playground):
A similar thing happens for a
Set
, so if it is possible for thereadonly
action to produce aReadonlySet
, that would be great, too.If you do not want to change the behavior of the
readonly
action to produceReadonlyMap
andReadonlySet
forMap
andSet
instances, then how would you feel about a separate action that could do this?Beta Was this translation helpful? Give feedback.
All reactions