Event context for ESM based workrs

I know that Durable Objects is in beta but the documentation don’t really mention that the new way of setting up workers with ESM modules is by exporting a named function “fetch” that receives a request and environment object as arguments.

The event object received from using the addEventListener for fetch events enabled functions such as passThroughOnException and waitUntil. How are these supposed to be implemented when utilizing ESM based workers?

ESM module handlers can receive a 3rd “context” object which has the passThroughOnException and waitUntil functions. For example

export default {
    async fetch(request, env, ctx) {