JameEnder
Explore posts from serversAarktype
•Created by JameEnder on 9/22/2024 in #questions
Automatic "full" discriminated union
Hello, I have this code:
But in this case, I have to add
field?: 'never'
to make the compiler happy when destructuring the validated input, else it says that some field doesn't exist on it.
Is there a way to make this work, or is my approach wrong from the start? Thank you! :D23 replies
Aarktype
•Created by JameEnder on 5/31/2024 in #questions
Mapping types
Hello, is it possible do to code like this?
And if so, is it possible to also inherit those types while mapping in logic, like so?
146 replies
Aarktype
•Created by JameEnder on 5/2/2024 in #questions
Referencing self
Hello, I have a type A
How can I reference itself in
arrayOf
? A
doesn't seem to work.4 replies
Aarktype
•Created by JameEnder on 4/12/2024 in #questions
Export type to JSON and share it
Hello, I have two TS programs that should cooperate (A B), B import types and validates data, and A creates and "saves" the types. A rough idea
Is this possible with the current API?
119 replies