I’m trying to use workers with modules and typescript. As a type of context I’m setting ExecutionContext and method waitUntil is visible in IDE. When I try to run on dev or deploy it’s throwing exception
TypeError: context.waitUntil is not a function at line 0, col -2
Where can I find example with typescript and types for context? Why it’s throwing error when "@cloudflare/workers-types": "3.4.0", contains types for this?
Sorry for the delay in getting back to you. It looks like your arguments to the fetch handler are misplaced though - it should be fetch(request, env, ctx) - it looks like you have ctx and env switched.