refactor(core): derive all schema.ts leaves' .zod via effect-zod walker (#23754)
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import { Schema } from "effect"
|
||||
import z from "zod"
|
||||
|
||||
import { Identifier } from "@/id/id"
|
||||
import { ZodOverride } from "@/util/effect-zod"
|
||||
import { zod, ZodOverride } from "@/util/effect-zod"
|
||||
import { withStatics } from "@/util/schema"
|
||||
|
||||
export const EventID = Schema.String.annotate({ [ZodOverride]: Identifier.schema("event") }).pipe(
|
||||
Schema.brand("EventID"),
|
||||
withStatics((s) => ({
|
||||
ascending: (id?: string) => s.make(Identifier.ascending("event", id)),
|
||||
zod: Identifier.schema("event").pipe(z.custom<Schema.Schema.Type<typeof s>>()),
|
||||
zod: zod(s),
|
||||
})),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user