Issue
Upgrading from 1.28.2 to 1.29.0/1.29.1 causes TypeScript errors:
Type '{ _type: "query"; _visibility: "internal"; _args: { ... }; }' is missing the following properties from type 'FunctionReference<"query", "internal" | "public">': _returnType, _componentPath
Reproduction
- Upgrade to 1.29.0 or 1.29.1
- Delete
convex/_generated
- Run
npx convex dev --once
- Run
npx tsc --noEmit
Root Cause
FunctionReference now has 5 type parameters (added ComponentPath), but AnyFunctionReference is still defined as FunctionReference<any, any> (only 2 parameters).
Generated api.js uses anyApi which returns AnyFunctionReference, causing type mismatch.
Workaround
Downgrade to 1.28.2
Environment
- Convex: 1.29.0, 1.29.1
- TypeScript: 5.x
- No components in use