What do you thing about a new notation for FormDataInfo? Something that looks more like the object that will get returned:
const formValues = decode(formData, {
title: 'string',
price: 'number',
created: 'date',
active: 'boolean',
tags: ['string'],
images: [{
title: 'string',
created: 'date',
file: 'file',
}]
,
});
Benefits:
- imho the DX is better: I know how my object should look like in the end. Its way easier to write down the object compared to paths where I want a transformation to happen.
- It pretty much looks like a valibot / zod schema. So switching between "pure" FormDataInfo and a Schema is super easy
What do you thing about a new notation for FormDataInfo? Something that looks more like the object that will get returned:
Benefits: