How do I get the input type for `type`?
I want to create a function to validate the
process.env
, but I'm having trouble typing the input def
into arktype.3 Replies
Take a look at the second example here for accepting a definition in your generic API:
https://arktype.io/docs/generics#external
wow its kinda crazy how everyone be writing this function https://github.com/imkunet/mygourd/blob/038daceee1fa468c7420d53471f355989eb3544c/lib/utils/env.ts#L13
GitHub
mygourd/lib/utils/env.ts at 038daceee1fa468c7420d53471f355989eb3544...
discord utility functions. Contribute to imkunet/mygourd development by creating an account on GitHub.
Yeah could be a nice utility package for sure!