post-me

Home > post-me > LocalHandle > setMethod

LocalHandle.setMethod() method

Set a specific method that will be exposed to the other end of the connection.

Signature:

setMethod<K extends keyof M>(methodName: K, method: M[K]): void;

Parameters

Parameter Type Description
methodName K The name of the method
method M[K] The function that will be exposed

Returns:

void