Exported query missing type annotations when building convex in another directory other than root
I have a query that looks like this (
src/convex/steam.ts
):
When building with my convex.json specifying src/convex
of my directory, tsc
fails for this reason:
2 Replies
weirder thing is if i run tsc twice, it seems like nothing is wrong and i can execute my built node project fine 👀
thanks for reporting, I can reproduce this every time by disabling incremental TypeScript compilation
It looks like adding these two fields to your tsconfig.json solves the issue, (because the file your tsconfig.json inherits from sets them to true) resolves the issue
so I wonder if this has to do with not making certain types public which could be. We'll look into it, but hopefully this unblocks you. I'm not sure it's always possible to build a declaration map from a from a library that contains recursive or nominal types.
Another solution would be excluding your convex directory from your tsconfig.json and letting the convex/tsconfig.json file can cover the TypeScript files in your convex directory instead.