terinjokes
Aarktype
•Created by terinjokes on 11/4/2024 in #questions
morphing to typescript type
I tried to do a narrow + pipe.try on
type("string")
to try to parse out a Temporal.ZonedDateTime
type to sort of replicate what type("string.date.iso.parse")
does, and it mostly works. But I've noticed if I infer the TS type I can't actually assign a Temporal.ZoneDateTime
to the field, as tsc complains that the valueOf
signatures are different. Is this supposed to work, or should I be venturing down the path of scopes and rootSchema
instead?
24 replies