useQueries should enforce types on the `queries` param
I just spent hours questioning my sanity on this error:
until I realized that I had a lowercase
querykey instead of queryKey.
I made a small reproduction of this here:
https://codesandbox.io/s/peaceful-aj-kvy7mm?file=/src/App.tsx
no typescript errors. on the answer you get the correct number of items, but all of them return copies of the last item resolved.
is it possible to type check this? how? I'd love to contribute here.1 Reply
realistic-cyan•3y ago
this correctly errors in v5: https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAKjgQwM5wEoFNkGN4BmUEIcA5FDvmQFCiSxwDecArqlgIqtZTBboAvnCIlyAARjIAdqim4A1gHpKeGAFoAjjygBPMnCVK4MXWAEAuOFFw0acOLgiz4AbVzIoAE1QAaOBwwAMKePgC6cAC8mFQwAHTsWADKUjBYADxyfNIA5q5hAHwAFK72DnAARAQATACcAKwARgDsAIwAzOqtXgBsyOoALO0EXuq1rQAMowSN7fUDrQONBPUAHMgVvmUOFT24tY3VE63N6tWNE9WDA8ijtXs96rOHyBMjrxP1FWVhAJQA3GUnC44K4AG7IAA2PH8gQAalCeBFotg1AkOClkGlMjBsjlihUKgCgc45HAwJ4oZCsJDuLx+Ohook6XwBEUmNs4Np6ZZHKFUHEQMgwEUisAvL8ogU4OzOQ5uXoFFhdFZXBUPN5NnBxWEtuVygrdAAxaRWIqSyLSgAKxBAwA4cUoqAgkLBWDFEs5gl+vzK3v+QA
release is planned for this week.
TS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.