Describe the bug
Regression on groq@5.8.1/node_modules/groq/lib/groq.d.cts.
Typecheck (with tsc and tsgo) fails on
await client.fetch(groq`*[...]`, params);
with
src/example.ts - error TS1362: 'groq' cannot be used as a value because it was exported using 'export type'.
groq`*[...]`
~~~~
node_modules/.pnpm/groq@5.8.1/node_modules/groq/lib/groq.d.cts:26:10 - 'groq' was exported here.
26 export { type groq as default, type defineQuery };
To Reproduce
Steps to reproduce the behavior:
- install groq@^5.8.1 @typescript/native-preview
- create a file with content
import groq from "groq";
const query = groq`*[]`;
- Run
pnpm tsgo --noEmit
- See error
Expected behavior
groq.d.cts should export the values and not the types, as does groq.d.ts and groq.cjs.
Which versions of Node.js / npm are you running?
node -v && pnpm -v
v22.22.0
10.28.2