fabian-hiller / valibot

The modular and type safe schema library for validating structural data 🤖
https://valibot.dev
MIT License
5.6k stars 169 forks source link

Missing TS warning in `pipe` method #669

Open fabian-hiller opened 2 weeks ago

fabian-hiller commented 2 weeks ago

The following code should raise a TypeScript warning because it can lead to a runtime error:

const Schema = v.pipe(v.optional(v.string()), v.transform<string, string>((s) => s.toLowerCase()));