Hi Nico,
Sorry to hear about your experience.
Can you share more details about your environment and steps to reproduce the issue?
Additionally, I just created a new ts function, which seems to work fine. Maybe you can use this to troubleshoot yours? https://github.com/pdebruin/functionsts/tree/main/1http
It also looks like your are caught between v3 and v4 of the programming model, which can be confusing. There is a blog post that discusses the changes https://techcommunity.microsoft.com/t5/apps-on-azure-blog/azure-functions-node-js-v4-programming-model-is-generally/ba-p/3929217 and there is a migration guide to move from v3 to v4 https://learn.microsoft.com/azure/azure-functions/functions-node-upgrade-v4
Hope this helps,
Pieter