using queryFn callback arguments breaks type inference (if placeholderData is a function)
Is this a known thing or potentially just a bug? It feels a bit like a bug.
https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzgVwM4FMCKz1QJ4A0c2ueAwgDbDoB2MRAjjvgPJgzAQ2pwC+cAMygQQcAOQABGAENuMgMYBrAPRR00+TAC0TUmICwAKCPyuqeLvyVqdOAF44NdAHdizclVowAFAEojJmYW7vYoGCT43ghGcHCWeADS6HgAXHAA2mKoIuhJeGIAugQxcGAUGugAFhAUACa4ACLSMmlgagBu9gB8pR3FhrHxAGI0aX7diCWxajDIUDSTA7HLMJXAqACSNAK4qGliNMDy6BT5cNI8pnJTfCW8Rrz+xoZX5nAARsKKtBF4oWhYdxRErxPJpTLZEC5ZKFfqxMoVap1RrNaStDoTNrodpwuLuEZpC54GjyODeaRQADmvgm0SWsVeNXQADoKBBKeSqcz5J46E8bjM5gs6csVmtNttdvtDsdTmJzpcgjd7ksVY8jEA
I'm not sure why the placeholderData callback cannot be supplied when I'm accessing the supplied value from the callback?
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.
4 Replies
correct-apricot•6mo ago
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.
correct-apricot•6mo ago
it's a typescript issues related to intra expression inference (whatever that means 😂 )
correct-apricot•6mo ago
I think it's this issue: https://github.com/microsoft/TypeScript/issues/53018
GitHub
Intra expression inference doesn't work within reverse mapped types...
Bug Report 🔎 Search Terms intra expression inference reverse mapped type 🕗 Version & Regression Information This is the behavior in every version I tried ⏯ Playground Link Playground link with ...
harsh-harlequinOP•6mo ago
Thats crazy! Thanks for pointing this out.