iosignal 5.3.0 → 6.1.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/browser/esm/io.d.ts +14 -4
- package/dist/browser/esm/io.js +4 -4
- package/dist/browser/esm/io.js.map +1 -1
- package/dist/browser/iife/io.js +4 -4
- package/dist/browser/iife/io.js.map +1 -1
- package/dist/node/iosignal.cjs +149 -470
- package/dist/node/iosignal.js +148 -469
- package/dist/types/client/IOCore.d.ts +14 -4
- package/package.json +2 -2
package/dist/browser/esm/io.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ declare class IOCore {
|
|
|
41
41
|
* @type {string}
|
|
42
42
|
*/
|
|
43
43
|
stateName: string;
|
|
44
|
+
_stateRevision: number;
|
|
44
45
|
/**
|
|
45
46
|
* Transmitted message counter.
|
|
46
47
|
* @type {number}
|
|
@@ -323,8 +324,8 @@ declare class IOCore {
|
|
|
323
324
|
*/
|
|
324
325
|
subscribe(tag: string): void;
|
|
325
326
|
/**
|
|
326
|
-
*
|
|
327
|
-
*
|
|
327
|
+
* Sends subscriptions stored by listen()/link() on each CID-ready transition,
|
|
328
|
+
* including reconnection. This automates subscription setup for simple clients.
|
|
328
329
|
*/
|
|
329
330
|
subscribe_channels(): void;
|
|
330
331
|
/**
|
|
@@ -334,7 +335,13 @@ declare class IOCore {
|
|
|
334
335
|
*/
|
|
335
336
|
unsubscribe(tag?: string): void;
|
|
336
337
|
/**
|
|
337
|
-
*
|
|
338
|
+
* Convenience API for simple clients (for example, CLI tools): register a
|
|
339
|
+
* tag handler once and remember its subscription in channels. Register before
|
|
340
|
+
* connection readiness; the CID-ready flow subscribes on initial connection
|
|
341
|
+
* and again after reconnect, without application-level ready/subscribe code.
|
|
342
|
+
* This does not send a subscription immediately, even if already ready.
|
|
343
|
+
* For precise subscription/send ordering or dynamic subscriptions, use
|
|
344
|
+
* on() with subscribe() in a ready handler instead. Direct signals use on('@').
|
|
338
345
|
* @param {string} tag - The tag to listen on.
|
|
339
346
|
* @param {Function} handler - The callback function to handle the signal.
|
|
340
347
|
* @throws {TypeError} If tag is not a string, handler is not a function, or tag length is invalid.
|
|
@@ -402,8 +409,11 @@ declare class IOCore {
|
|
|
402
409
|
* 1. 상태가 변경 될 때만 'change' 이벤트 호출된다.
|
|
403
410
|
* 2. emitEventAndMessage 옵션 값이 지정되야 해당 이벤트 이름이 호출된다.
|
|
404
411
|
* 보통 이벤트 이름과 동일하게 적거나 이벤트 상황 안내문을 넣는다.
|
|
412
|
+
* 3. 두 상태값 갱신 후 change, 개별 이벤트 순서로 호출한다.
|
|
413
|
+
* 콜백에서 다른 상태로 전이하면 이전 상태의 개별 이벤트는 생략한다.
|
|
414
|
+
* @returns {boolean} Whether this transition is still current after callbacks.
|
|
405
415
|
*/
|
|
406
|
-
stateChange(state: string, emitEventAndMessage?: string):
|
|
416
|
+
stateChange(state: string, emitEventAndMessage?: string): boolean;
|
|
407
417
|
}
|
|
408
418
|
type Buffer$1 = boho.Buffer;
|
|
409
419
|
|