From 52090cc7b1381e71a10ce17435c157837494c520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Mon, 11 Mar 2024 01:09:59 +0100 Subject: [PATCH] Fix --- src/schema/effect/option.ts | 2 +- src/tests.ts | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/schema/effect/option.ts b/src/schema/effect/option.ts index 82becf6..53b6abf 100644 --- a/src/schema/effect/option.ts +++ b/src/schema/effect/option.ts @@ -8,7 +8,7 @@ export const option = { z.union([option.some(schema), option.none(schema)]), some: (schema: S) => z - .custom(v => Option.isOption(v) && Option.isSome(v), "Not an Option") + .custom>>(v => Option.isOption(v) && Option.isSome(v), "Not an Option") .pipe(z.object({ value: schema }).passthrough()) .transform>>(identity), diff --git a/src/tests.ts b/src/tests.ts index a9cd7f0..dff7e44 100644 --- a/src/tests.ts +++ b/src/tests.ts @@ -3,11 +3,6 @@ import { z } from "zod" import { zodSchemaClass } from "./builders/ZodSchemaClassBuilder" import { dejsonify, jsonify } from "./schema/jsonifiable" import { MobXObservableZodSchemaObject } from "./traits/MobXObservableZodSchemaObject" -import { effect } from "./schema/effect" - - -const stringOption = effect.option.option(z.string()) -type T = z.output const exp = zodSchemaClass