nateiler
Aarktype
•Created by nateiler on 4/3/2025 in #questions
Partial parse
Once in a while we encounter some data that's been stored away and the schema has changed over time. I'd like to parse it but also be forgiving enough to return the partially parsed schema. Something like this:
9 replies
Aarktype
•Created by nateiler on 3/24/2025 in #questions
Reference another schema type as default?
Hello, I'm relatively new to Arktype. I've managed to figure out most of our Zod migration, however I have a couple scenarios where I would like to reference other types as default values -or- compose a 'computed' property.
In this scenario I'd like to use the provided 'createdAt' value as the default 'modifiedAt' value:
And in this scenario, I'm doing some parsing prior to return an API payload. I would like to compose a type based off two other types:
Note : these are simplified examples
Both seem somewhat related, but I haven't figured out how or if it's possible to accomplish these.
3 replies