How can I use custom runtimes (that transform a value into another type) with other runtypes?
For example, if I wanted to verify an optional BigInt type:
st.optional(bigIntRuntype()) // 🛑
This would fail because bigIntRuntype() returns bigint whereas st.optional() expects Runtype<unknown> as a parameter.
With the built-in runtypes, it works. Example:
st.optional(stringAsInteger()) // ✅