refactor(schema): use Schema.Int and consolidate PositiveInt/NonNegativeInt (#24029)

This commit is contained in:
Kit Langton
2026-04-23 13:22:48 -04:00
committed by GitHub
parent 93940a1859
commit 0590452456
6 changed files with 24 additions and 22 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
import { Schema } from "effect"
import { zod } from "@/util/effect-zod"
import { withStatics } from "@/util/schema"
import { PositiveInt, withStatics } from "@/util/schema"
export const Server = Schema.Struct({
port: Schema.optional(Schema.Number.check(Schema.isInt()).check(Schema.isGreaterThan(0))).annotate({
port: Schema.optional(PositiveInt).annotate({
description: "Port to listen on",
}),
hostname: Schema.optional(Schema.String).annotate({ description: "Hostname to listen on" }),