MCPcopy Create free account
hub / github.com/ProNextJS/declarative-routing / getInnerType

Function getInnerType

examples/nextjs/finished/src/routes/utils.ts:150–158  ·  view source on GitHub ↗
(schema: z.ZodTypeAny)

Source from the content-addressed store, hash-verified

148}
149
150function getInnerType(schema: z.ZodTypeAny) {
151 switch (schema.constructor) {
152 case z.ZodOptional:
153 case z.ZodDefault:
154 return schema._def.innerType;
155 default:
156 return schema;
157 }
158}
159
160function parseNumber(str: string): ParsedData<number> {
161 const num = +str;

Callers 1

convertToRequiredTypeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected