v5 The inferred type of 'X' cannot be named without a reference to...
The following code is fine for the TS language server with version 4, however, then uprgading react-query to version 5 the following error shows up.
2 Replies
optimistic-gold•3y ago
what would you expect to happen with this code? It looks pretty invalid to me
fair-roseOP•3y ago
It's invalid indeed, just removed a lot of not-required code to reproduce the issue. However, it seems that there is a bug with typescript that caused it (can't find the GH issue atm).
Removing those 2 lines resolved the issue (not sure why i had them in the first place as its a Next app):