Use event-first handlers by default and mark ambiguous handler styles explicitly
Devflare runtime supports event-first handlers, request-wide middleware, route method handlers, and explicit markers for ambiguous two-argument worker-style or resolve-style functions.
This page documents , , , , event-first handlers, and route dispatch with examples that match the actual exports.
- Best for
- Runtime import and dispatch questions
- Worker-safe import
- Ambiguous case
- Two-argument fetch handlers
Copy the handler style that matches the job
The ambiguous error is intentional
If a two-argument handler is not marked, Devflare cannot safely know whether it is or . Mark it instead of relying on parameter names.
Event-first and route-dispatch examples
Previous
sequence(...)
Use from when broad HTTP concerns must wrap route resolution or another fetch handler in a clear top-to-bottom order.
Next
transport.ts
Most workers do not need a transport file. Add one when Devflare’s local RPC-style bridge must encode and decode custom values, especially across Durable Object method calls in tests.