JesusTheHun
JesusTheHun
Aarktype
Created by JesusTheHun on 11/19/2024 in #questions
`narrow` vs `satisfying`
so to see an actual difference, I would need to pipe the type in order to alter its input, correct ?
11 replies
Aarktype
Created by JesusTheHun on 11/19/2024 in #questions
`narrow` vs `satisfying`
kk, I'll try to compare the two with in/out
11 replies
Aarktype
Created by JesusTheHun on 11/19/2024 in #questions
`narrow` vs `satisfying`
Or something
?? 😂
11 replies
Aarktype
Created by JesusTheHun on 10/29/2024 in #questions
Union of generics
gtg, will be back tonight
23 replies
Aarktype
Created by JesusTheHun on 10/29/2024 in #questions
Union of generics
how can you add that option to a type after the declaration ? Like myArkValidator.options({ reject: true )
23 replies
Aarktype
Created by JesusTheHun on 10/29/2024 in #questions
Union of generics
Pick whatever comes first in my switch ^^ it's an internal API so I the end-dev has basic knowledge of the API. But yes, you are right, I would prefer the request to be rejected. With '+': 'reject' it will throw if there is more prop that the member of the union allow ? That's sick 😍
23 replies
Aarktype
Created by JesusTheHun on 10/29/2024 in #questions
Union of generics
So like this ?
type({
foo: 'string',
'+': 'delete'
})
type({
foo: 'string',
'+': 'delete'
})
23 replies
Aarktype
Created by JesusTheHun on 10/29/2024 in #questions
Union of generics
I'm gonna do specific specs, no prop iteration so it should be fine, but if I can strip extra props I'm all for it
23 replies
Aarktype
Created by JesusTheHun on 10/29/2024 in #questions
Union of generics
you mean to strip additionnal properties ?
23 replies
Aarktype
Created by JesusTheHun on 10/29/2024 in #questions
Union of generics
I want +:reject ?
23 replies
Aarktype
Created by JesusTheHun on 10/29/2024 in #questions
Union of generics
It works. It is not very readable though. Is there any piece of doc to learn how to write functions that take a Type as parameter ? I've tried a few things and my function generics could never capture the true type of the given arguments. This way I could write a function that just build the tuple tower for me ^^
23 replies
Aarktype
Created by JesusTheHun on 10/29/2024 in #questions
Union of generics
Oh, I'm gonna try that
23 replies
Aarktype
Created by JesusTheHun on 10/29/2024 in #questions
Merging types instead of using an intersection when using generics
what is a HKT ?
7 replies
Aarktype
Created by JesusTheHun on 10/29/2024 in #questions
Merging types instead of using an intersection when using generics
I'm gonna open a feature request
7 replies
Aarktype
Created by JesusTheHun on 10/29/2024 in #questions
Merging types instead of using an intersection when using generics
It works nicely, but if there is any nesting to deal with, it will become impractical :/
7 replies
Aarktype
Created by JesusTheHun on 10/28/2024 in #questions
Generic & intersection
nope, nothing about merge
21 replies
Aarktype
Created by JesusTheHun on 10/28/2024 in #questions
Generic & intersection
oh yeah, I've seen the issues on GH ^^
21 replies
Aarktype
Created by JesusTheHun on 10/28/2024 in #questions
Generic & intersection
are you the author of the lib ?
21 replies
Aarktype
Created by JesusTheHun on 10/28/2024 in #questions
Generic & intersection
do you want me to open another topic for my question about merge vs & ?
21 replies
Aarktype
Created by JesusTheHun on 10/28/2024 in #questions
Generic & intersection
It works perfectly ! You are a beast 😄
21 replies