All syntax in parameters definitions and all references to generic args are fully-type safe and autocompleted like any builtin keyword. Constraints can be used just like TS to limit what can be passed to a generic and allow that arg to be used with operators like >.
import { type } from "arktype"const nonEmpty = type("<arr extends unknown[]>", "arr > 0")const nonEmptyNumberArray = nonEmpty("number[]")
Our new generics have been built using a new method for integrating arbitrary external types as native ArkType generics! This opens up tons of possibilities for external integrations that would otherwise not be possible. As a preview, here's what the implementation of Partial looks like internally: