|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
703 bytes
|
| Line | |
|---|
| 1 | import { RpcProcedure } from './RpcProcedure';
|
|---|
| 2 | import { RpcMessagePort } from './RpcMessagePort';
|
|---|
| 3 | declare type RpcCallHandler<TPayload = any, TResult = any> = (payload: TPayload) => Promise<TResult>;
|
|---|
| 4 | interface RpcService {
|
|---|
| 5 | readonly isOpen: () => boolean;
|
|---|
| 6 | readonly open: () => Promise<void>;
|
|---|
| 7 | readonly close: () => Promise<void>;
|
|---|
| 8 | readonly addCallHandler: <TPayload, TResult>(procedure: RpcProcedure<TPayload, TResult>, handler: RpcCallHandler<TPayload, TResult>) => void;
|
|---|
| 9 | readonly removeCallHandler: <TPayload, TResult>(procedure: RpcProcedure<TPayload, TResult>) => void;
|
|---|
| 10 | }
|
|---|
| 11 | declare function createRpcService(port: RpcMessagePort): RpcService;
|
|---|
| 12 | export { RpcService, createRpcService };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.