File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,6 @@ fake(px) // '100px'
9292- .intersection 🚧
9393- .refine ❌
9494- .superRefine ❌
95- - .transform 🚧
9695
9796## About
9897
Original file line number Diff line number Diff line change @@ -596,8 +596,14 @@ const validSuits: { schema: z.ZodMiniType; description?: string; only?: boolean;
596596 description : 'refinement' ,
597597 } ,
598598
599- // TODO: transform
600- // { schema: z.transform(val => String(val)) },
599+ // transform
600+ {
601+ schema : z . pipe (
602+ z . string ( ) ,
603+ z . transform ( val => val . length ) ,
604+ ) ,
605+ description : 'transform' ,
606+ } ,
601607
602608 // tuple
603609 {
Original file line number Diff line number Diff line change @@ -598,7 +598,10 @@ const validSuits: { schema: z.ZodType; description?: string; only?: boolean; asy
598598 } ,
599599
600600 // TODO: transform
601- // { schema: z.transform(val => String(val)) },
601+ {
602+ schema : z . string ( ) . pipe ( z . transform ( val => val . length ) ) ,
603+ description : 'transform' ,
604+ } ,
602605
603606 // tuple
604607 {
You can’t perform that action at this time.
0 commit comments