libshv-js 10.0.0 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rpcvalue.d.ts +1 -1
- package/dist/shv-ri.js +3 -1
- package/dist/ws-client.js +5 -1
- package/package.json +1 -1
package/dist/rpcvalue.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type ShvString = string;
|
|
|
20
20
|
export type DateTime = Date & {
|
|
21
21
|
utc_offset?: number;
|
|
22
22
|
};
|
|
23
|
-
declare const withOffset: (date: Date, utcOffset
|
|
23
|
+
declare const withOffset: (date: Date, utcOffset: number) => DateTime;
|
|
24
24
|
export type List = RpcValue[];
|
|
25
25
|
declare const shvMapType: unique symbol;
|
|
26
26
|
type IMap<T extends Record<number, RpcValue> = Record<number, RpcValue>> = T & {
|
package/dist/shv-ri.js
CHANGED
|
@@ -18,7 +18,9 @@ export class ShvRI {
|
|
|
18
18
|
const signalSepIx = signalSepRelative !== -1 ? signalSepRelative : undefined;
|
|
19
19
|
this.ri = ri;
|
|
20
20
|
this.methodSepIx = methodSepIx;
|
|
21
|
-
|
|
21
|
+
if (signalSepIx !== undefined) {
|
|
22
|
+
this.signalSepIx = signalSepIx;
|
|
23
|
+
}
|
|
22
24
|
const method = this.method();
|
|
23
25
|
if (method.length === 0) {
|
|
24
26
|
throw new Error('Method must not be empty.');
|
package/dist/ws-client.js
CHANGED
|
@@ -495,7 +495,11 @@ class WsClient {
|
|
|
495
495
|
}
|
|
496
496
|
this.sendRpcMessage(rq);
|
|
497
497
|
const promise = new RpcRequestPromise(resolve => {
|
|
498
|
-
this.rpcHandlers[rqId] = {
|
|
498
|
+
this.rpcHandlers[rqId] = {
|
|
499
|
+
resolve,
|
|
500
|
+
timeout_handle: makeTimeout(this.timeout, resolve),
|
|
501
|
+
...(options?.delayCallback !== undefined && { delayCallback: options.delayCallback }),
|
|
502
|
+
};
|
|
499
503
|
}, () => {
|
|
500
504
|
this.sendRpcMessage(makeRq(makeIMap({
|
|
501
505
|
[RPC_MESSAGE_ABORT]: true,
|