Cobain
Explore posts from serversAarktype
•Created by Cobain on 10/9/2024 in #questions
Function which receives a arktype's 'type'
I understand, thanks!
13 replies
Aarktype
•Created by Cobain on 10/9/2024 in #questions
Function which receives a arktype's 'type'
Yeah typescript with generic types in functions has never worked well
13 replies
Aarktype
•Created by Cobain on 10/9/2024 in #questions
Function which receives a arktype's 'type'
if I don't cast it, the parsedResponse has this type: finalizeDistillation<T, _distill<T, {
endpoint: "out";
}>>
13 replies
Aarktype
•Created by Cobain on 10/9/2024 in #questions
Function which receives a arktype's 'type'
So casting here is ok
13 replies
Aarktype
•Created by Cobain on 10/9/2024 in #questions
Function which receives a arktype's 'type'
13 replies
Aarktype
•Created by Cobain on 9/20/2024 in #questions
Use native ts type
Right I was doing that but and by default TS considered it string, doing what Dimava suggested makes this union of string literals that I wanted, thanks!
5 replies
Aarktype
•Created by Cobain on 9/6/2024 in #questions
Represent the File class
great thanks, also if i have to validate an object which has lots of keys, but i only want to validate it has the ones im interested in, is there a way to do like a "partial validation"?
23 replies
Aarktype
•Created by Cobain on 9/6/2024 in #questions
Represent the File class
Ok I ended doing that. When I access later a type declared in the scope doing
types.example
, the typing of example
doesn't only include itself but all the other scope data, but will only validate the first part right? here:
23 replies
Aarktype
•Created by Cobain on 9/6/2024 in #questions
Represent the File class
Ok, thanks for the quick response
23 replies
Aarktype
•Created by Cobain on 9/6/2024 in #questions
Represent the File class
Right ok, yeah probably gonna think about the performance side as the main reason i'm trying to switch from Zod is this
23 replies
Aarktype
•Created by Cobain on 9/6/2024 in #questions
Represent the File class
Another unrelated question, is there a way to reference to another type's attributes when declaring a new type? something like this:
23 replies