So in order for tsc not to crap itself about the return value, you need to tell it - in the place you're calling useParams - what it's going to return.
Is anyone gonna come up with an idiomatic way of doing this, or is it just idiotic like that? I mean, this seems to very much defeat the purpose of TS, and makes you write the same potential error twice.
So in order for tsc not to crap itself about the return value, you need to tell it - in the place you're calling
useParams
- what it's going to return.Is anyone gonna come up with an idiomatic way of doing this, or is it just idiotic like that? I mean, this seems to very much defeat the purpose of TS, and makes you write the same potential error twice.
so what do you suggest should be done to solve this error?