This commit is contained in:
crusader 2018-09-05 15:28:09 +09:00
parent d75a41c523
commit de5e2d9a3d
5 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@overflow/rpc-js", "name": "@overflow/rpc-js",
"version": "0.0.1", "version": "0.0.4",
"description": "TypeScript library setup for multiple compilation targets using tsc and webpack", "description": "TypeScript library setup for multiple compilation targets using tsc and webpack",
"main": "./bundles/index.umd.js", "main": "./bundles/index.umd.js",
"module": "./esm5/index.js", "module": "./esm5/index.js",

View File

@ -70,6 +70,13 @@ export abstract class Client {
this.clientRWC.disconnect(); this.clientRWC.disconnect();
} }
/**
* connectionStatus
*/
public connectionStatus(): Observable<boolean> | undefined {
return this.clientRWC.connectionStatus();
}
/** /**
* notify * notify
*/ */

View File

@ -20,7 +20,7 @@ export class JSONClientCodec implements ClientCodec {
jsonrpc: version, jsonrpc: version,
method, method,
params: 0 === params.length ? null : params, params: 0 === params.length ? null : params,
id, id: undefined !== id && 0 < id ? id : undefined,
}; };
return this.codecSelector.encode(JSON.stringify(req)); return this.codecSelector.encode(JSON.stringify(req));

View File

@ -12,7 +12,7 @@ export class JSONClientNotificationCodec implements ClientNotificationCodec {
public method(): string { public method(): string {
return this.noti.method; return this.noti.method;
} }
public params(): any[] | undefined { public params(): string[] | undefined {
return this.noti.params; return this.noti.params;
} }
} }

View File

@ -1,4 +1,4 @@
export interface RegistryCodec { export interface RegistryCodec {
method(): string; method(): string;
params(): any | undefined; params(): string[] | undefined;
} }