This sorta dances on the line between Jovo and the language, apologies if it’s considered off topic…
-
In my code, as in the Jovo3 example I used as a starting point, a lot of the response code is replicated across intents. It would be cleaner to encapsulate that as a subroutine. But that parallel code references Jovo objects via ‘this’. I’m not sure how to write a subroutine that implicitly has the same ‘this’ as its caller. I could pass the object explicitly (poor man’s OO) but since it’s typescript I would need to declare the type of ‘that’ and I’m not sure what type the Jovo handler has. SO: What would be best practice here to factor out the shared logic?
-
Related to that: Does the response code act when the call to tell/ask/etc. Is made, or do those just build a structure which is returned by the handler and then acted upon? I’ve been presuming the latter, but I’ve never been sure.