return channel.listen(propKey);
}
// Function
return async function (...args: unknown[]) {
// Add context if any
let methodArgs: unknown[];
if (options && !isUndefinedOrNull(options.context)) {
methodArgs = [options.context, ...args];
methodArgs = args;
}
const result = await channel.call(propKey, methodArgs);
// Revive unless marshalling disabled