standard schema conforming schema in openauth not working seemingly exclusively with arktype?
i'm using the openauth library which is supposed to support standard schema for
subjects
definition.
i get typesafe output with zod, and the docs use valibot so i assume those 2 work
though with arktype i just get a generic v1.StandardSchema<unknown, unknown>
type on the resulting object. with zod i get
initially i thought this is an issue with openauth, but considering there's this standard schema, and i'm only seeing the issue on arktype i thought i'd come here first, perhaps there's an obvious mistake i'm making? this is the code
the link to openauth at the start of the message goes to the subjects part in question4 Replies
Is this with arktype 2.1+?
2.0.4, updating now. was this a known issue?
Yeah, essentially in some contexts where AT was wrapped it would be not be inferred correctly due to some quirks of TS and
NoInfer
.
With 2.0.4
, it probably works if you don't inline the definition like:
With 2.1+ it should work either waysweet, works with the updated version (i also tried the alternative ^ and it did work too, but i like the inline 🙂 )
thanks!