Dimava
Aarktype
•Created by Dimava on 9/16/2024 in #questions
Generic with Narrow/Morph
I want to make something like
Please help me to make it work
4 replies
Aarktype
•Created by Dimava on 9/12/2024 in #questions
`string.integer.parsed` with limits
I need a simple port number,
1 < integer < 9999
Hovewer, I want to parse it from env string
so I need string.integer.parse
How do I make the limited parsed integer?37 replies
Aarktype
•Created by Dimava on 6/18/2024 in #questions
Type Magic: validation on type property
How to validate defs in object type properties?
I did that three days ago but I forgot how
31 replies
Aarktype
•Created by Dimava on 6/15/2024 in #questions
Usage for HTTP validation
I'm looking to use Arktype as a Request/Response validator
This comes with the following requirements:
- Request body should be validated with deep
reject
unknownKeys so invalid requests are immediately 422
- Response should be validated with deep delete
unknownKeys so local information can't passthrough
- Response input should be cloned rather then inline-morphed (including key deletion) so you can pass in input objects as-is
Please list recommended AT APIs for this
Please link the related undone issues is any64 replies
Aarktype
•Created by Dimava on 8/18/2023 in #questions
Context-sensitive validation / validation with parameters
What is the best/easiest way to write a validator which ensures that all
bar
s are present in bars
?41 replies
Aarktype
•Created by Dimava on 5/15/2023 in #questions
Custom type-making functions
I want to make a chainable that can create types the same way
type
does
How do I implement that?
2 replies
Aarktype
•Created by Dimava on 5/4/2023 in #questions
How to access current scope types with `type()` / `morph()` / `narrow()` / `arrayOf()` inside scope?
How to access current scope types with
type()
/ morph()
/ narrow()
/ arrayOf()
inside scope?
2 replies