tendies123
Explore posts from serversTTCTheo's Typesafe Cult
•Created by tendies123 on 12/13/2023 in #questions
Inferred Type Parameter from a Fixed Union is Different from a Parameter that is a Fixed Union
I think I was running into this problem a lot because I like to program in itnerfaces
so all of my union types
would reach methods in pojos and pull inputs from those pojos
that all had the same params for input (less work than it sounds honestly)
But they had different return types (duh)
So those different return types were fucking me in the union case and I couln't figure it out
Because the union was playing nice for all the inputs
(Since my inputs were the same)
But suddenly for outputs i was getting recked
And typescript's error system isn't as good as rust so it iddn't poitn this out to me
3 replies