Skip to content

TypeScript error: _componentPath missing in FunctionReference (v1.29.0, v1.29.1) #254

@ForSite

Description

@ForSite

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

  1. Upgrade to 1.29.0 or 1.29.1
  2. Delete convex/_generated
  3. Run npx convex dev --once
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions