mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-25 23:35:17 +00:00
16 lines
415 B
TypeScript
16 lines
415 B
TypeScript
import { Schema } from "effect"
|
|
import z from "zod"
|
|
|
|
import { withStatics } from "@/util/schema"
|
|
|
|
const projectIdSchema = Schema.String.pipe(Schema.brand("ProjectID"))
|
|
|
|
export type ProjectID = typeof projectIdSchema.Type
|
|
|
|
export const ProjectID = projectIdSchema.pipe(
|
|
withStatics((schema: typeof projectIdSchema) => ({
|
|
global: schema.make("global"),
|
|
zod: z.string().pipe(z.custom<ProjectID>()),
|
|
})),
|
|
)
|