Discuss about Valibot 🤖 #52
fabian-hiller
announced in
Announcements
Replies: 1 comment 7 replies
-
It's not completely clear to me when transformations apply. I commonly need to map from something that has type HasEntries<T = string, U = unknown> = {
entries: () => [T, U][];
}
const entriesToObject = (x: HasEntries) => Object.fromEntries(x.entries); Would this be a transform? How would I chain it together with an object schema like the following? const mySchema = object({
foo: optional(string()),
bar: string(),
}) |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Everything that does not fit to an issue or PR will probably find the right place here. We are happy about every new idea! Please be respectful to each other when discussing.
Beta Was this translation helpful? Give feedback.
All reactions