You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use transform to convert the data type, I am not able to obtain the correct type.
import{z}from'zod';import{printNode,zodToTs}from'zod-to-ts';// define your Zod schemaconstUserSchema=z.object({username: z.string(),age: z.number(),avatar: z.string().transform((value)=>{// convert...return{src: value,width: 100,height: 100,};}),});// pass schema and name of type/identifierconst{ node }=zodToTs(UserSchema,'User');constcode=printNode(node);console.log(code);
When I use transform to convert the data type, I am not able to obtain the correct type.
The text was updated successfully, but these errors were encountered: