Closed Etsija closed 6 months ago
Does this report, just like mine, need to go to upstream https://github.com/hey-api/openapi-ts as well?
I'd like an answer to the question above, as we need a fix to this issue, and need to know whether we should create a ticket upstream.
This is a bug.
queryKey
should always be used.
The issue is that when there are no parameters for a request, then the queryKey is not used in the hook; this is incorrect.
We should be using the provided queryKey if it is provided.
A work-around until a fix is implemented is to add the // @ts-nocheck to the files or to add the following properties to your tsconfig
{
...
"noUnusedParameters": false,
"noUnusedLocals": false
...
}
Thanks for the reply, I will be following this issue to see when a proper fix is implemented so we can remove our workarounds for it.
Describe the bug Files
queries/queries.ts
andqueries/suspense.ts
generate TS errors fromqueryKey
being declared but its value never read, resulting in error TS6133 when building a project with the API.OpenAPI JSON causing the bug api.json
Expected behavior Either don't generate unused parameters, or auto-insert
to generated files which may declare unused variables.