Bjorno
Bjorno
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
Could you give an example of nested discriminated unions, similarly to how you would do in TS?
24 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
I don't think I understand
24 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
I'm assuming this would break if you had nested discriminated unions
24 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
Or is it planned?
24 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
Is there any way to make that work within ArkType?
24 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
It is similar, but it's not enforcing a constraint, you could merge with a kind not related to the original type.
24 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
I guess my question is more related to discriminated unions from a DX standpoint. I find myself not being able to declare types as I mostly do in TS with ArkType. And that's the only reason I can't adopt it.
24 replies