[solved] return type of request handler
Why is 1) is fine and 2) has a type problem?
1)
2)
I don't see it
2 Replies
You don’t need to await the return of c. Also in future adding await before return is redundant. You should be able to call render without a return because once render makes a return to context it will continue to the next middleware or result
Thanks, @Nico ... that wasn't the really the question though ... sorry, for the comment ... let me adjust this
It seems like
Promise<HtlEscapedString>
is not a type that is valid to return
yet it works in 1)
but the tooling complains in 2)
OK, I get it now
c.html()
returns a response and hence the mismatch.
So it's either
or