• Extends target payload with source payload after validating source

    Type Parameters

    • S extends Record<string, unknown>

    • T extends Record<string, unknown>

    Parameters

    • source: S

      the source payload

    • schema: ZodType<S, ZodTypeDef, S>

      the source schema

    • Optional target: T

      the target payload

    Returns S & T

    the extended payload

Generated using TypeDoc