UNPKG

next-rest-framework

Version:

Next REST Framework - write type-safe, self-documenting REST APIs in Next.js

5 lines (4 loc) 261 B
import { type z } from 'zod'; export type BaseSchemaType = z.ZodSchema; export type BaseObjectSchemaType = z.AnyZodObject; export type SchemaReturnType<T extends BaseSchemaType> = T extends z.ZodSchema ? z.infer<T> : Partial<Record<string, string | string[]>>;