Decorates a Flow method as an RPC handler. Use declareRPCMethod instead when the runtime cannot transform decorators.
Handler input type.
Handler output type.
Optionaloptions: RPCOptions<Input, Output>Optional codecs and RPC settings. Omitted codecs use JSON.
A stage-3 method decorator validated during Registry construction.
Creates a typed RPC method decorator.
Registry construction validates handler shape, unique names, and locks. The handler receives Context and optional input, then returns RPCResult or void. Omitted input and output codecs use JSON. Scalar wire kinds still need an explicit codec. A method with only a Context parameter and a void return is a procedure. Default-parameter methods report
Function.lengthwithout those parameters, so passinputCodecwhen a trailing input uses a default. Use declareRPCMethod instead when the runtime cannot transform decorators.Example
Param: options
Codecs and optional name, timeout, and lock settings.
Returns
A stage-3 method decorator.
Throws
RangeError when
timeoutMsis negative.