Typescript Inference for getServerSideProps-like function
So I'm having some issues with type inference on typescript that I cannot wrap my head around. It's something like this: https://tsplay.dev/WzxAQN.
How do I make it infer the correct type without manually specifying the return type?
How do I make it infer the correct type without manually specifying the return type?
Solution
