Commit Detail
Commit 6caa936
Implement automatic self-referential bindings via ctx.exports. For every top-level export, `ctx.exports` will contain a corresponding property which acts as a binding to that export. If the export is a simple object or `WorkerEntrypoint`, then the `ctx.exports` property is a service binding. If the export is a Durable Object class (and it has been configured with storage), the `ctx.exports` property is a DO namespace binding. So you can do: `ctx.exports.MyEntrypoint.someRpc()` And it calls `someRpc()` on the entrypoint named `MyEntrypoint`, as if you had called it over a service binding. This is marked experimental for now since it won't work on the edge until further changes are made to our control plane.
Files changed
8 files changed~8 modified