Ingvar Stepanyan @rreverser.com · 02/03/2026I feel like I'm missing something.Ingvar Stepanyan@rreverser.comWould it be just an alias for typeof? 110
Adam Rackis @adamrackis.bsky.social · 02/03/2026Imagine if you could do typeof, but with actual code, but code that doesn’t execute. So in react do type HookResult = decltype useFoo(); But useFoo() doesn’t actually execute. TS just pretends it did, and notes the return type. 120
Ingvar Stepanyan @rreverser.com · 02/03/2026Ah, fair enough, yeah that requires a bit uglier `ReturnType<typeof useFoo>`. 110