From 2d2eb92f3a32573ba3bf6a00544ccde0313488c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Mon, 11 Mar 2024 00:56:18 +0100 Subject: [PATCH] Fix --- src/schema/effect/option.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/schema/effect/option.ts b/src/schema/effect/option.ts index b23f0b9..82becf6 100644 --- a/src/schema/effect/option.ts +++ b/src/schema/effect/option.ts @@ -4,6 +4,9 @@ import { z } from "zod" export const option = { + option: (schema: S) => + z.union([option.some(schema), option.none(schema)]), + some: (schema: S) => z .custom(v => Option.isOption(v) && Option.isSome(v), "Not an Option") .pipe(z.object({ value: schema }).passthrough()) @@ -15,7 +18,4 @@ export const option = { ? z.output : unknown >>(v => Option.isOption(v) && Option.isNone(v), "Not an Option"), - - option: (schema: S) => - z.union([option.some(schema), option.none(schema)]), } as const