0.1.2 #3

Merged
Thilawyn merged 136 commits from next into master 2024-03-11 19:44:21 +01:00
2 changed files with 1 additions and 6 deletions
Showing only changes of commit 52090cc7b1 - Show all commits

View File

@@ -8,7 +8,7 @@ export const option = {
z.union([option.some(schema), option.none(schema)]),
some: <S extends z.ZodSchema>(schema: S) => z
.custom(v => Option.isOption(v) && Option.isSome(v), "Not an Option")
.custom<Option.Some<z.output<S>>>(v => Option.isOption(v) && Option.isSome(v), "Not an Option")
.pipe(z.object({ value: schema }).passthrough())
.transform<Option.Some<z.output<S>>>(identity),

View File

@@ -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<typeof stringOption>
const exp = zodSchemaClass