get-convex / convex-helpers

A collection of useful code to complement the official packages.
MIT License
94 stars 16 forks source link

Can't use zid from convex-helpers #50

Closed iamrakhmatov closed 8 months ago

iamrakhmatov commented 9 months ago

Problem: Getting ts error when using zid from convex-helpers if in tsconfig "declaration": true

ianmacartney commented 8 months ago

@iamrakhmatov I've been trying to reproduce this but haven't been able. Can you provide a project with a repro I can check out? I can easily just export the Zid and ZidDef but I'm not sure if that will fix it, or if I can avoid exposing them (since they shouldn't need to be used directly).

If you can't create a repro, can you provide:

  1. Where is the error happening? on npx convex dev, running you frontend app locally, or building it?
  2. If not npx convex dev, then what tool is being used?
  3. What is the tsconfig in convex/? How has it been modified? That file is for the convex cli to bundle and send files to the Convex backend, and I don't believe impacts the frontend app's build process.

Sorry for the delay here - I've been catching up from the holidays.

ianmacartney commented 8 months ago

Actually after linking in the helpers another way I got a repro and I believe it's just solved by exporting just Zid. I've cut convex-helpers@0.1.10-alpha.1 for you to verify the fix. Feel free to re-open if it's still an issue!