Type Alias RpcMethodParams<TArgs, TReturn>

RpcMethodParams<TArgs, TReturn>: ((this: Component, ...args: [...TArgs, RpcCallParams]) => Promise<TReturn>)

Type helper for RPC method scoped to NetRpcScope.TargetClient that enforces:

  • The method must be an instance method (not static) via the this: Component constraint
  • The method must return a Promise
  • The method must accept RpcCallParams as the last argument, which allows specifying target clients, reliability, and timeout for the RPC call.

Type Parameters

  • TArgs extends any[]
  • TReturn