Closed chimame closed 3 weeks ago
The items specified when generating a tupleAsync schema are curried. So I wrote this fix.
items
This change is for the same reason as the previous change to the variant schema. #600
I have created code that reproduces this issue.
import * as v from 'valibot'; const Schema = v.tupleAsync([v.number(), v.string()]); const convertSchema = { ...Schema, items: Schema.items.map((item) => { v.pipeAsync( v.unknown(), v.transform((output) => { console.log('not execute') return output == null ? 0 : output }), item, ) }) } console.log('start parse') const result = await v.safeParseAsync(convertSchema, [null, 'test']); console.log('end parse') console.log(result); // <-- parse error
Thank you! I will review and merge it soon.
v0.32.0 is available
Overview
The
items
specified when generating a tupleAsync schema are curried. So I wrote this fix.Details
This change is for the same reason as the previous change to the variant schema. #600
I have created code that reproduces this issue.