How to make a function whose return type is inferred to be the same as an input function's - Deno