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 >.
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:
Recursive and cyclic generics are also currently unavailable and will be added soon.
For more usage examples, check out the unit tests for generics here.
This feature was built to be very robust and flexible. We're excited to see what you do with it!