ing
This commit is contained in:
parent
d75a41c523
commit
de5e2d9a3d
|
@ -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",
|
||||||
|
|
|
@ -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
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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));
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export interface RegistryCodec {
|
export interface RegistryCodec {
|
||||||
method(): string;
|
method(): string;
|
||||||
params(): any | undefined;
|
params(): string[] | undefined;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user