sstanfS
Convex Community4mo ago
4 replies
sstanf

Unable to get proper API typing in IDE

Advice
After switching to a monorepo setup (PNPM workspaces with NX), I am no longer able to get typing/auto complete with api. aside from auth functions and one other function set.

Deleting the _generated folder and running npx convex dev doesn't solve the issue.

_generated/api.d.ts appears to contain all the correct typing.

My frontend (Tanstack Start) TS config:

{
  "include": ["**/*.ts", "**/*.tsx"],
  "compilerOptions": {
    "target": "ES2022",
    "jsx": "react-jsx",
    "module": "ESNext",
    "lib": ["ES2022", "DOM", "DOM.Iterable"],
    "types": ["vite/client"],

    /* Bundler mode */
    "moduleResolution": "bundler",
    "allowImportingTsExtensions": true,
    "verbatimModuleSyntax": false,
    "noEmit": true,

    /* Linting */
    "skipLibCheck": true,
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noFallthroughCasesInSwitch": true,
    "noUncheckedSideEffectImports": true,
    "baseUrl": ".",
    "paths": {
      "~/*": ["./*"],
      "@/*": ["./src/*"],
      "@buzzfair/ui/components/*": ["../../packages/ui/src/components/*"],
      "@buzzfair/ui/form/*": ["../../packages/ui/src/form/*"],
      "@buzzfair/ui/maps/*": ["../../packages/ui/src/maps/*"],
      "@buzzfair/ui/global/*": ["../../packages/ui/src/global/*"],
      "@buzzfair/ui/kibo-ui/*": ["../../packages/ui/src/kibo-ui/*"],
      "@buzzfair/ui/hooks/*": ["../../packages/ui/src/hooks/*"],
      "@buzzfair/ui/lib/*": ["../../packages/ui/src/lib/*"],
      "@buzzfair/convex/*": ["../../packages/convex/*"]
    }
  }
}
Was this page helpful?