Home > post-me > LocalHandle > setMethod
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;
| Parameter | Type | Description |
|---|---|---|
| methodName | K | The name of the method |
| method | M[K] | The function that will be exposed |
Returns:
void