(name: string, command: unknown, service: vsls.SharedService | vsls.SharedServiceProxy | null)
| 135 | // has no request methods, and for *most* purposes, there is little functional |
| 136 | // difference between request and notify. |
| 137 | export function liveShareOnRequest(name: string, command: unknown, service: vsls.SharedService | vsls.SharedServiceProxy | null): void { |
| 138 | if (isGuest()) { |
| 139 | // is guest service |
| 140 | (service as vsls.SharedServiceProxy).onNotify(name, command as vsls.NotifyHandler); |
| 141 | } else { |
| 142 | // is host service |
| 143 | (service as vsls.SharedService).onRequest(name, command as vsls.RequestHandler); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | export function liveShareRequest(name: string, ...rest: unknown[]): unknown { |
| 148 | if (isGuest()) { |
no test coverage detected