• Decorator to define the Zod validation schema for DTO classes

    Type Parameters

    • T extends ZodType<{ [key: string]: unknown }, { [key: string]: unknown }>

    Parameters

    • schema: T

      The Zod schema to use for validation.

    Returns (target: Class<TypeOf<T>>) => void

    A class decorator that applies the schema.