arktype with isolatedDeclarations
If you have a package that uses
arktype
and isolatedDeclarations: true
in tsconfig.json
(for speed, OXC/tsdown support), then you'll likely see this error:
Is there a way to explicitly provide a return type annotation without redeclaring the whole thing?7 Replies
No, you'll run into this problem with any library with schema inference. It's inherently in conflict with isolatedDeclarations, which is why I don't recommend that setting unless you're a really large project with very few dependencies that rely on inference and have a ton of tolerance for repetitive declarations to help somewhat improve compilation speed.
Good to know. You’re right.
Didn’t know if there was a “simple” answer.
There probably is one, and that’s to use tsup or zshy in Arktype projects, not tsdown 😅
I'm sitting next to Colin right now he recommends zshy 👍
lol, I have both - I needed to inline some private packages which means ✨ bundle ✨
Tell Colin I said hi! And that turbo watch build should close a few open issues 🙏
Where you at? Some coffee shop someplace?
Wait, hang on. OR Did he come to your place because of all the snarky Zod tweets you made!?
Yeah it's a beatdown
We are at Squiggle Conf https://squiggleconf.com/
SquiggleConf 2025 | Supercharging web devs and their tools
A Boston conference for excellent web dev tooling.
Oh, cool! I've yet to go. Money's tight af here 🙁