dynamodb-toolbox
Version:
Lightweight and type-safe query builder for DynamoDB and TypeScript.
12 lines (11 loc) • 777 B
TypeScript
import { z } from 'zod';
import type { SetSchema } from '../../../../schema/index.js';
import type { Overwrite } from '../../../../types/overwrite.js';
import type { WithValidate } from '../utils.js';
import type { SchemaZodParser } from './schema.js';
import type { ZodParserOptions } from './types.js';
import type { WithDefault, WithOptional } from './utils.js';
export type SetZodParser<SCHEMA extends SetSchema, OPTIONS extends ZodParserOptions = {}> = SetSchema extends SCHEMA ? z.ZodTypeAny : WithDefault<SCHEMA, OPTIONS, WithOptional<SCHEMA, OPTIONS, WithValidate<SCHEMA, z.ZodSet<SchemaZodParser<SCHEMA['elements'], Overwrite<OPTIONS, {
defined: true;
}>>>>>>;
export declare const getSetZodParser: (schema: SetSchema, options?: ZodParserOptions) => z.ZodTypeAny;