triplit icon indicating copy to clipboard operation
triplit copied to clipboard

`moduleResolution` set to `node` causing issues with `useQuery` type inference

Open wernst opened this issue 7 months ago • 0 comments

Reproduction:

  1. Create Triplit app via create-triplit-app
  2. Switch "moduleResolution" from "bundler" to "node" in tsconfig.json
  3. App.tsx has ts compiler error at useQuery

This does not impact methods on the TriplitClient, it is only the useQuery hook. It appears the schema isnt getting picked up by type inference properly

useQuery<Models<unknown>, never>(client: TriplitClient<Models<unknown>> | WorkerClient<M> ...

wernst avatar Apr 30 '25 16:04 wernst