IO Wallet SDK
    Preparing search index...
    • Builds a schema with the same keys as the source object and a replacement validator for each key.

      Type Parameters

      • T extends Readonly<
            {
                [k: string]: $ZodType<
                    unknown,
                    unknown,
                    $ZodTypeInternals<unknown, unknown>,
                >;
            },
        >

      Parameters

      • schema: ZodObject<T>

        Source object schema whose keys are preserved.

      • newValidator: ZodType

        Validator assigned to every key in the returned schema.

      Returns ZodObject<
          Record<
              string,
              ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>,
          >,
      >

      New Zod object schema with swapped field validators.