ActorMethodParameters
ActorMethodParameters<
T> =TextendsActorMethod<infer Args,any> ?Args:Textends (…args) =>Promise<any> ?Args:never
Defined in: types/reactor.ts:49
Extract the argument tuple of a service method.
ActorMethod carries a withOptions member as well as a call signature, so a
service written with plain function types — claim: (id: Uint8Array) => Promise<Result> instead of ActorMethod<[Uint8Array], Result> — does not
match it. That used to fall through to never, which compiles at the
declaration site and then fails at every hook call site with
“Type ‘Uint8Array[]’ is not assignable to type ‘undefined’”. didc/dfx output
always uses ActorMethod, so only hand-written or third-party service types
hit it, and the error never pointed at the cause.
The plain-function fallback below makes both shapes infer identically.
Type Parameters
Section titled “Type Parameters”T