dibbo
Aarktype
•Created by dibbo on 11/3/2024 in #questions
Generic middleware validator
I think that should show the issue, thanks for looking into this
6 replies
Aarktype
•Created by dibbo on 11/3/2024 in #questions
Generic middleware validator
Sure. I've moved the call outside of the middleware chain i.e.
and I'm still seeing the error so I think we can rule out
use
/handler
interfering with it. Here are the other types
Here's a CodeSandbox link to the ark schemas and their usage6 replies
Aarktype
•Created by PIat on 9/17/2024 in #questions
Dynamic type based on another value
As always, thank you for the help 🙏
24 replies
Aarktype
•Created by PIat on 9/17/2024 in #questions
Dynamic type based on another value
Although thinking about it, I would also like to use it as a Type in the application, so I'm guessing I'll have to do the
or
ing24 replies
Aarktype
•Created by PIat on 9/17/2024 in #questions
Dynamic type based on another value
Runtime (I think - its used to validate incoming request bodies)
24 replies
Aarktype
•Created by PIat on 9/17/2024 in #questions
Dynamic type based on another value
Sure, 2 secs
24 replies
Aarktype
•Created by PIat on 9/17/2024 in #questions
Dynamic type based on another value
Is there an alternative approach to this available via arktype at all? I have run into a similar scenario but with many possible key/value combinations.
Rather than writing a specific type for each scenario and
or
ing them, can I configure a property to be required/optional based on the value(s) of other properties?24 replies
Aarktype
•Created by dibbo on 8/29/2024 in #questions
Optional property with const string array
Oh nice, I didn’t know that was an option. Thank you for the replies
6 replies
Aarktype
•Created by dibbo on 8/27/2024 in #questions
Indexed Access Types
Nice, thank you for the help!
9 replies
Aarktype
•Created by dibbo on 8/27/2024 in #questions
Indexed Access Types
Thank you! Good question... I've been looking at this for so long I can't remember 😂 Let me give a more detailed example: I'm trying to create a type to be used to validate the payload in a search request. I've landed on this as the implementation
I was wondering if there was a cleaner/preferred way to pick out the
value
prop from the size
array with arktype, rather than creating a new array via the map.9 replies
Aarktype
•Created by dibbo on 8/16/2024 in #questions
Latest "keys:distilled" equivalent?
No problem at all, thank you for the (impressively fast) response! 👍
11 replies