Array/Object keys to type?
So I got this object:
Which as you can see has a few keys, you can pass these keys in an array, how would I make a ArkType for them automatically/dynamically since this object updates often.
Without ArkType we currently use the following:
Can't figure out yet how I would make this in ArkType. Anyone have some ideas?
4 Replies
In 0.15 that's
If you already have them in an object I would try something like this:
You can try messing around with the type here!
https://stackblitz.com/edit/mrvfrm-gq6z2z?file=type.ts
JSON.stringify
Thanks both!
Will use: