17 Replies
Other than handling it as a promise on the output object, no.
Something I've thought a bit about but it seems it would add a huge amount of complexity to the type system for somewhat marginal benefit? Would be interested in uses cases where it feels really impactful though and somewhat open to reconsidering in the long term
got it, makes sense, any recommendations you would have for my usecase, would you recommend to just encrypt it before passing to the validator?
or afterwards myself ig
Probably after? I guess it depends a bit on the situation but usually after
thanks, appreciate the quick reply
Taking the next couple days off so good timing on the questions 😅 There's some other folks in here who may able to chip in but yeah tough to get answers otherwise on my intent for some missing feature or similar
yes, I think a lof these questions could be handled better in docs, for example ctx.reject isn't documented at all afaik
and maybe an FAQ for the async morph stuff
Yeah you should have seen the docs a couple months ago though already a lot better. Trying to keep logging issues in the backlog to continue improving and add new functionality. Definitely an area I'd love contributions if you're so inclined!
is there a getting started for how to contribute? maybe even doc specific
There's a contributing guide yeah but it's not really doc specific. Broadly speaking though it's pretty easy to see how most of the repo works and to add docs similar to what else is there. I'd focus on stuff that is relatively objective and narrow (e.g. an faq on async validators or maybe more on reject) rather than high-level overviews of concepts which might be more nuanced.
https://github.com/arktypeio/arktype/blob/main/.github/CONTRIBUTING.md
thanks
is there an issue where doc stuff is assigned or tracked? so multiple people don't try to write docs for the same thing
You can create a GitHub issue for it which would be helpful mostly for me for tracking purposes, but you might be overestimating the number of people trying to write docs for the project 😛
got it
created a PR, can also create accompanying issue if would help https://github.com/arktypeio/arktype/pull/1302
GitHub
docs: document current stance on async morphs by vanillacode314 · P...
Document that async morphs are not supported and it is intentional since the use cases aren't compelling enough yet and it would add a lot of complexity to the codebase
Great, will take a look at this on Tuesday, thank you!
will try later to document ctx.reject but don't understand it myself enough XD, I think it's a discriminated union but the autocomplete doesn't help at all lol
Yeah it's discriminated on code
TS doesn't always give great hints for that kind of thing though depending on what keys you include first
makes sense