Is there any way to tell typescript that my function will always return?
as the title says is there any way to tell typescript that my function will return a type? because sometimes you cant add the default return at the end but you know that it will always return, not really a big problem, but then my function has a return type of Type | undefined which is kinda annoying

4 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
it gives me an error expecting an end return
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
oh that works
thank you