Function: lumenizeRpcDO()
lumenizeRpcDO<
T
>(DOClass
,config
):T
Defined in: packages/rpc/src/lumenize-rpc-do.ts:441
Adds RPC capabilities to a Durable Object class using a factory pattern.
This is the recommended approach for most use cases as it provides a clean separation between your business logic and RPC handling.
Type Parameters
T
T
extends (...args
) => any
Parameters
DOClass
T
The Durable Object class to enhance
config
RpcConfig
= {}
Optional RPC configuration
Returns
T
Enhanced DO class with RPC endpoints
See
For working examples, see the test files in packages/rpc/test/ and doc-test/