How to make a function whose return type is inferred to be the same as an input function's
This is what I got so far.
I'm not sure if it's possible, but I need the following:
-
fn
type must be the exact same as finalFunc
's (parameters and return) plus the first parameter being of type Context
- abc
parameter must have it's type properly inferred from Context
when writing finalFunc
Am I missing something?1 Reply
After some more experimenting, I found that switching the twos
unknown
types over there by any
did the trick. I'm not really sure why.