UNPKG

dynamodb-toolbox

Version:

Lightweight and type-safe query builder for DynamoDB and TypeScript.

8 lines (7 loc) 578 B
import { z } from 'zod'; import type { AnySchema } from '../../../../schema/index.js'; import type { WithValidate } from '../utils.js'; import type { ZodFormatterOptions } from './types.js'; import type { WithDecoding, WithOptional } from './utils.js'; export type AnyZodFormatter<SCHEMA extends AnySchema, OPTIONS extends ZodFormatterOptions = {}> = WithDecoding<SCHEMA, OPTIONS, WithOptional<SCHEMA, OPTIONS, WithValidate<SCHEMA, z.ZodType<SCHEMA['props']['castAs']>>>>; export declare const anyZodFormatter: (schema: AnySchema, options: ZodFormatterOptions) => z.ZodTypeAny;