@scalar/oas-utils
Version:
Open API spec and Yaml handling utilities
5 lines • 463 B
TypeScript
import type { ZodSchema, ZodTypeDef } from 'zod';
/** Parse an value from a given schema with optional error or null return */
export declare function schemaModel<T, I = any>(data: I, schema: ZodSchema<T, ZodTypeDef, any>, throwError?: true, errorLocation?: string): T;
export declare function schemaModel<T, I = any>(data: I, schema: ZodSchema<T, ZodTypeDef, any>, throwError?: false, errorLocation?: string): T | null;
//# sourceMappingURL=schema-model.d.ts.map