Currently, refine has a type guard which is used to narrow down the output type.
refine<RefinedOutput extends Output>(
check: (arg: Output) => arg is RefinedOutput,
message?: /* ... */
): ZodEffects<this, RefinedOutput, RefinedOutput>;
superRefine: (
refinement: RefinementEffect<Output>["refinement"]
) => ZodEffects<this, Output, Input>;
I propose adding this functionality to superRefine as well.