© 2026 Hedgehog Software, LLC
import { type } from "arktype" const Thing = type("string.numeric.parse | number") .to("0<number<=65535") .configure({ message: (ctx) => { return "This is a custom error" } }) // const out = Thing("abcd") // Shows custom error const out = Thing("999999") // Shows default error