@laplace.live/ws 7.0.1 → 7.0.2
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.d.ts +2 -2
- package/dist/browser.js +17 -17
- package/dist/index.d.ts +2 -2
- package/dist/index.js +18 -18
- package/dist/{ws-BJGEziZp.d.ts → ws-D63GKJdI.d.ts} +18 -18
- package/package.json +1 -1
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as KeepLive, b as LiveWSBase, W as WSOptions } from './ws-
|
|
2
|
-
export {
|
|
1
|
+
import { K as KeepLive, b as LiveWSBase, W as WSOptions } from './ws-D63GKJdI.js';
|
|
2
|
+
export { c as LaplaceRawEvent, a as LiveOptions } from './ws-D63GKJdI.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* WebSocket client for a Bilibili live room (browser).
|
package/dist/browser.js
CHANGED
|
@@ -1788,7 +1788,7 @@ var brotliDecompressAsync = (d) => Uint8Array.from(BrotliDecode(Int8Array.from(d
|
|
|
1788
1788
|
var inflates = { inflateAsync, brotliDecompressAsync };
|
|
1789
1789
|
|
|
1790
1790
|
// src/events.ts
|
|
1791
|
-
var
|
|
1791
|
+
var LaplaceRawEvent = class extends Event {
|
|
1792
1792
|
data;
|
|
1793
1793
|
constructor(type, data) {
|
|
1794
1794
|
super(type);
|
|
@@ -1821,12 +1821,12 @@ var KeepLive = class extends EventTarget {
|
|
|
1821
1821
|
this.connect(false);
|
|
1822
1822
|
}
|
|
1823
1823
|
/**
|
|
1824
|
-
* Overridden to also dispatch a `
|
|
1824
|
+
* Overridden to also dispatch a `LaplaceRawEvent<Event>` with type `"event"`
|
|
1825
1825
|
* for every event, enabling catch-all listeners.
|
|
1826
1826
|
*/
|
|
1827
1827
|
dispatchEvent(event) {
|
|
1828
1828
|
const result = super.dispatchEvent(event);
|
|
1829
|
-
super.dispatchEvent(new
|
|
1829
|
+
super.dispatchEvent(new LaplaceRawEvent("event", event));
|
|
1830
1830
|
return result;
|
|
1831
1831
|
}
|
|
1832
1832
|
/**
|
|
@@ -1849,8 +1849,8 @@ var KeepLive = class extends EventTarget {
|
|
|
1849
1849
|
connection.addEventListener("event", (e) => {
|
|
1850
1850
|
const evt = e.data;
|
|
1851
1851
|
if (evt.type !== "error") {
|
|
1852
|
-
if (evt instanceof
|
|
1853
|
-
this.dispatchEvent(new
|
|
1852
|
+
if (evt instanceof LaplaceRawEvent) {
|
|
1853
|
+
this.dispatchEvent(new LaplaceRawEvent(evt.type, evt.data));
|
|
1854
1854
|
} else {
|
|
1855
1855
|
this.dispatchEvent(new Event(evt.type));
|
|
1856
1856
|
}
|
|
@@ -1906,11 +1906,11 @@ var KeepLive = class extends EventTarget {
|
|
|
1906
1906
|
return this.connection.send(data);
|
|
1907
1907
|
}
|
|
1908
1908
|
/**
|
|
1909
|
-
* Subscribe to an event type with a typed {@link
|
|
1909
|
+
* Subscribe to an event type with a typed {@link LaplaceRawEvent} listener.
|
|
1910
1910
|
*
|
|
1911
1911
|
* @typeParam T - Expected data type carried by the event.
|
|
1912
1912
|
* @param type - Event name (e.g. `"heartbeat"`, `"msg"`, `"DANMU_MSG"`).
|
|
1913
|
-
* @param listener - Callback receiving a {@link
|
|
1913
|
+
* @param listener - Callback receiving a {@link LaplaceRawEvent LaplaceRawEvent\<T\>}.
|
|
1914
1914
|
* @param options - Standard `addEventListener` options.
|
|
1915
1915
|
*/
|
|
1916
1916
|
on(type, listener, options) {
|
|
@@ -2067,16 +2067,16 @@ var Live = class extends EventTarget {
|
|
|
2067
2067
|
this.online = data;
|
|
2068
2068
|
clearTimeout(this.timeout);
|
|
2069
2069
|
this.timeout = setTimeout(() => this.heartbeat(), 1e3 * 30);
|
|
2070
|
-
this.dispatchEvent(new
|
|
2070
|
+
this.dispatchEvent(new LaplaceRawEvent("heartbeat", this.online));
|
|
2071
2071
|
}
|
|
2072
2072
|
if (type === "message") {
|
|
2073
|
-
this.dispatchEvent(new
|
|
2073
|
+
this.dispatchEvent(new LaplaceRawEvent("msg", data));
|
|
2074
2074
|
const cmd = data.cmd || data.msg?.cmd;
|
|
2075
2075
|
if (cmd) {
|
|
2076
2076
|
if (cmd.includes("DANMU_MSG")) {
|
|
2077
|
-
this.dispatchEvent(new
|
|
2077
|
+
this.dispatchEvent(new LaplaceRawEvent("DANMU_MSG", data));
|
|
2078
2078
|
} else {
|
|
2079
|
-
this.dispatchEvent(new
|
|
2079
|
+
this.dispatchEvent(new LaplaceRawEvent(cmd, data));
|
|
2080
2080
|
}
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
|
@@ -2106,12 +2106,12 @@ var Live = class extends EventTarget {
|
|
|
2106
2106
|
});
|
|
2107
2107
|
}
|
|
2108
2108
|
/**
|
|
2109
|
-
* Overridden to also dispatch a `
|
|
2109
|
+
* Overridden to also dispatch a `LaplaceRawEvent<Event>` with type `"event"`
|
|
2110
2110
|
* for every event, enabling catch-all listeners.
|
|
2111
2111
|
*/
|
|
2112
2112
|
dispatchEvent(event) {
|
|
2113
2113
|
const result = super.dispatchEvent(event);
|
|
2114
|
-
super.dispatchEvent(new
|
|
2114
|
+
super.dispatchEvent(new LaplaceRawEvent("event", event));
|
|
2115
2115
|
return result;
|
|
2116
2116
|
}
|
|
2117
2117
|
/** Send a heartbeat packet to the server. */
|
|
@@ -2130,12 +2130,12 @@ var Live = class extends EventTarget {
|
|
|
2130
2130
|
);
|
|
2131
2131
|
}
|
|
2132
2132
|
/**
|
|
2133
|
-
* Subscribe to an event type with a typed {@link
|
|
2133
|
+
* Subscribe to an event type with a typed {@link LaplaceRawEvent} listener.
|
|
2134
2134
|
* Convenience wrapper around {@link EventTarget.addEventListener}.
|
|
2135
2135
|
*
|
|
2136
2136
|
* @typeParam T - Expected data type carried by the event.
|
|
2137
2137
|
* @param type - Event name (e.g. `"heartbeat"`, `"msg"`, `"DANMU_MSG"`).
|
|
2138
|
-
* @param listener - Callback receiving a {@link
|
|
2138
|
+
* @param listener - Callback receiving a {@link LaplaceRawEvent LaplaceRawEvent\<T\>}.
|
|
2139
2139
|
* @param options - Standard `addEventListener` options.
|
|
2140
2140
|
*/
|
|
2141
2141
|
on(type, listener, options) {
|
|
@@ -2172,7 +2172,7 @@ var LiveWSBase = class extends Live {
|
|
|
2172
2172
|
ws.addEventListener("open", (e) => this.dispatchEvent(new Event(e.type)));
|
|
2173
2173
|
ws.addEventListener(
|
|
2174
2174
|
"message",
|
|
2175
|
-
(e) => this.dispatchEvent(new
|
|
2175
|
+
(e) => this.dispatchEvent(new LaplaceRawEvent("message", new Uint8Array(e.data)))
|
|
2176
2176
|
);
|
|
2177
2177
|
ws.addEventListener("close", (e) => this.dispatchEvent(new Event(e.type)));
|
|
2178
2178
|
ws.addEventListener("error", () => this.dispatchEvent(new Event("_error")));
|
|
@@ -2192,7 +2192,7 @@ var KeepLiveWS = class extends KeepLive {
|
|
|
2192
2192
|
}
|
|
2193
2193
|
};
|
|
2194
2194
|
export {
|
|
2195
|
-
DataEvent,
|
|
2196
2195
|
KeepLiveWS,
|
|
2196
|
+
LaplaceRawEvent,
|
|
2197
2197
|
LiveWS
|
|
2198
2198
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as Live, I as Inflates, a as LiveOptions, K as KeepLive, b as LiveWSBase, W as WSOptions } from './ws-
|
|
2
|
-
export {
|
|
1
|
+
import { L as Live, I as Inflates, a as LiveOptions, K as KeepLive, b as LiveWSBase, W as WSOptions } from './ws-D63GKJdI.js';
|
|
2
|
+
export { c as LaplaceRawEvent } from './ws-D63GKJdI.js';
|
|
3
3
|
import { Socket } from 'node:net';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var brotliDecompressAsync = (b) => _brotli(b);
|
|
|
8
8
|
var inflates = { inflateAsync, brotliDecompressAsync };
|
|
9
9
|
|
|
10
10
|
// src/events.ts
|
|
11
|
-
var
|
|
11
|
+
var LaplaceRawEvent = class extends Event {
|
|
12
12
|
data;
|
|
13
13
|
constructor(type, data) {
|
|
14
14
|
super(type);
|
|
@@ -41,12 +41,12 @@ var KeepLive = class extends EventTarget {
|
|
|
41
41
|
this.connect(false);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* Overridden to also dispatch a `
|
|
44
|
+
* Overridden to also dispatch a `LaplaceRawEvent<Event>` with type `"event"`
|
|
45
45
|
* for every event, enabling catch-all listeners.
|
|
46
46
|
*/
|
|
47
47
|
dispatchEvent(event) {
|
|
48
48
|
const result = super.dispatchEvent(event);
|
|
49
|
-
super.dispatchEvent(new
|
|
49
|
+
super.dispatchEvent(new LaplaceRawEvent("event", event));
|
|
50
50
|
return result;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
@@ -69,8 +69,8 @@ var KeepLive = class extends EventTarget {
|
|
|
69
69
|
connection.addEventListener("event", (e) => {
|
|
70
70
|
const evt = e.data;
|
|
71
71
|
if (evt.type !== "error") {
|
|
72
|
-
if (evt instanceof
|
|
73
|
-
this.dispatchEvent(new
|
|
72
|
+
if (evt instanceof LaplaceRawEvent) {
|
|
73
|
+
this.dispatchEvent(new LaplaceRawEvent(evt.type, evt.data));
|
|
74
74
|
} else {
|
|
75
75
|
this.dispatchEvent(new Event(evt.type));
|
|
76
76
|
}
|
|
@@ -126,11 +126,11 @@ var KeepLive = class extends EventTarget {
|
|
|
126
126
|
return this.connection.send(data);
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
|
-
* Subscribe to an event type with a typed {@link
|
|
129
|
+
* Subscribe to an event type with a typed {@link LaplaceRawEvent} listener.
|
|
130
130
|
*
|
|
131
131
|
* @typeParam T - Expected data type carried by the event.
|
|
132
132
|
* @param type - Event name (e.g. `"heartbeat"`, `"msg"`, `"DANMU_MSG"`).
|
|
133
|
-
* @param listener - Callback receiving a {@link
|
|
133
|
+
* @param listener - Callback receiving a {@link LaplaceRawEvent LaplaceRawEvent\<T\>}.
|
|
134
134
|
* @param options - Standard `addEventListener` options.
|
|
135
135
|
*/
|
|
136
136
|
on(type, listener, options) {
|
|
@@ -290,16 +290,16 @@ var Live = class extends EventTarget {
|
|
|
290
290
|
this.online = data;
|
|
291
291
|
clearTimeout(this.timeout);
|
|
292
292
|
this.timeout = setTimeout(() => this.heartbeat(), 1e3 * 30);
|
|
293
|
-
this.dispatchEvent(new
|
|
293
|
+
this.dispatchEvent(new LaplaceRawEvent("heartbeat", this.online));
|
|
294
294
|
}
|
|
295
295
|
if (type === "message") {
|
|
296
|
-
this.dispatchEvent(new
|
|
296
|
+
this.dispatchEvent(new LaplaceRawEvent("msg", data));
|
|
297
297
|
const cmd = data.cmd || data.msg?.cmd;
|
|
298
298
|
if (cmd) {
|
|
299
299
|
if (cmd.includes("DANMU_MSG")) {
|
|
300
|
-
this.dispatchEvent(new
|
|
300
|
+
this.dispatchEvent(new LaplaceRawEvent("DANMU_MSG", data));
|
|
301
301
|
} else {
|
|
302
|
-
this.dispatchEvent(new
|
|
302
|
+
this.dispatchEvent(new LaplaceRawEvent(cmd, data));
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
}
|
|
@@ -329,12 +329,12 @@ var Live = class extends EventTarget {
|
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
331
|
/**
|
|
332
|
-
* Overridden to also dispatch a `
|
|
332
|
+
* Overridden to also dispatch a `LaplaceRawEvent<Event>` with type `"event"`
|
|
333
333
|
* for every event, enabling catch-all listeners.
|
|
334
334
|
*/
|
|
335
335
|
dispatchEvent(event) {
|
|
336
336
|
const result = super.dispatchEvent(event);
|
|
337
|
-
super.dispatchEvent(new
|
|
337
|
+
super.dispatchEvent(new LaplaceRawEvent("event", event));
|
|
338
338
|
return result;
|
|
339
339
|
}
|
|
340
340
|
/** Send a heartbeat packet to the server. */
|
|
@@ -353,12 +353,12 @@ var Live = class extends EventTarget {
|
|
|
353
353
|
);
|
|
354
354
|
}
|
|
355
355
|
/**
|
|
356
|
-
* Subscribe to an event type with a typed {@link
|
|
356
|
+
* Subscribe to an event type with a typed {@link LaplaceRawEvent} listener.
|
|
357
357
|
* Convenience wrapper around {@link EventTarget.addEventListener}.
|
|
358
358
|
*
|
|
359
359
|
* @typeParam T - Expected data type carried by the event.
|
|
360
360
|
* @param type - Event name (e.g. `"heartbeat"`, `"msg"`, `"DANMU_MSG"`).
|
|
361
|
-
* @param listener - Callback receiving a {@link
|
|
361
|
+
* @param listener - Callback receiving a {@link LaplaceRawEvent LaplaceRawEvent\<T\>}.
|
|
362
362
|
* @param options - Standard `addEventListener` options.
|
|
363
363
|
*/
|
|
364
364
|
on(type, listener, options) {
|
|
@@ -420,7 +420,7 @@ var LiveTCPBase = class extends Live {
|
|
|
420
420
|
this.i = 0;
|
|
421
421
|
this.buf = Buffer.from(this.buf);
|
|
422
422
|
}
|
|
423
|
-
this.dispatchEvent(new
|
|
423
|
+
this.dispatchEvent(new LaplaceRawEvent("message", pack));
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
};
|
|
@@ -442,7 +442,7 @@ var LiveWSBase = class extends Live {
|
|
|
442
442
|
ws.addEventListener("open", (e) => this.dispatchEvent(new Event(e.type)));
|
|
443
443
|
ws.addEventListener(
|
|
444
444
|
"message",
|
|
445
|
-
(e) => this.dispatchEvent(new
|
|
445
|
+
(e) => this.dispatchEvent(new LaplaceRawEvent("message", new Uint8Array(e.data)))
|
|
446
446
|
);
|
|
447
447
|
ws.addEventListener("close", (e) => this.dispatchEvent(new Event(e.type)));
|
|
448
448
|
ws.addEventListener("error", () => this.dispatchEvent(new Event("_error")));
|
|
@@ -496,9 +496,9 @@ var KeepLiveTCP = class extends KeepLive {
|
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
498
|
export {
|
|
499
|
-
DataEvent,
|
|
500
499
|
KeepLiveTCP,
|
|
501
500
|
KeepLiveWS,
|
|
501
|
+
LaplaceRawEvent,
|
|
502
502
|
LiveTCP,
|
|
503
503
|
LiveWS,
|
|
504
504
|
getConf,
|
|
@@ -16,7 +16,7 @@ type Inflates = {
|
|
|
16
16
|
* Used throughout the library to deliver structured messages such as
|
|
17
17
|
* heartbeat counts, danmaku payloads, and other server-pushed data.
|
|
18
18
|
*
|
|
19
|
-
* Also used internally with `
|
|
19
|
+
* Also used internally with `LaplaceRawEvent<Event>` as a catch-all meta-event
|
|
20
20
|
* (type `"event"`) to forward all events through {@link KeepLive}.
|
|
21
21
|
*
|
|
22
22
|
* @typeParam T - The type of the data payload attached to this event.
|
|
@@ -28,7 +28,7 @@ type Inflates = {
|
|
|
28
28
|
* })
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
declare class
|
|
31
|
+
declare class LaplaceRawEvent<T> extends Event {
|
|
32
32
|
data: T;
|
|
33
33
|
constructor(type: string, data: T);
|
|
34
34
|
}
|
|
@@ -64,12 +64,12 @@ type LiveOptions = {
|
|
|
64
64
|
* |---------------|--------------------|--------------------------------------------------|
|
|
65
65
|
* | `open` | — | Underlying transport connected. |
|
|
66
66
|
* | `live` | — | Server acknowledged the join (room entered). |
|
|
67
|
-
* | `heartbeat` | `
|
|
68
|
-
* | `msg` | `
|
|
69
|
-
* | `DANMU_MSG` | `
|
|
67
|
+
* | `heartbeat` | `LaplaceRawEvent<number>`| Online viewer count received from server. |
|
|
68
|
+
* | `msg` | `LaplaceRawEvent<any>` | Any server command message. |
|
|
69
|
+
* | `DANMU_MSG` | `LaplaceRawEvent<any>` | Danmaku (chat) message. |
|
|
70
70
|
* | `close` | — | Connection closed. |
|
|
71
71
|
* | `error` | — | Unrecoverable error (connection is closed). |
|
|
72
|
-
* | `event` | `
|
|
72
|
+
* | `event` | `LaplaceRawEvent<Event>` | Meta-event wrapping every dispatched event. |
|
|
73
73
|
*
|
|
74
74
|
* Subclasses ({@link LiveWSBase}, {@link LiveTCPBase}) provide the concrete
|
|
75
75
|
* transport and supply `send` / `close` callbacks to this constructor.
|
|
@@ -100,7 +100,7 @@ declare class Live extends EventTarget {
|
|
|
100
100
|
close: () => void;
|
|
101
101
|
} & LiveOptions);
|
|
102
102
|
/**
|
|
103
|
-
* Overridden to also dispatch a `
|
|
103
|
+
* Overridden to also dispatch a `LaplaceRawEvent<Event>` with type `"event"`
|
|
104
104
|
* for every event, enabling catch-all listeners.
|
|
105
105
|
*/
|
|
106
106
|
dispatchEvent(event: Event): boolean;
|
|
@@ -113,15 +113,15 @@ declare class Live extends EventTarget {
|
|
|
113
113
|
*/
|
|
114
114
|
getOnline(): Promise<number>;
|
|
115
115
|
/**
|
|
116
|
-
* Subscribe to an event type with a typed {@link
|
|
116
|
+
* Subscribe to an event type with a typed {@link LaplaceRawEvent} listener.
|
|
117
117
|
* Convenience wrapper around {@link EventTarget.addEventListener}.
|
|
118
118
|
*
|
|
119
119
|
* @typeParam T - Expected data type carried by the event.
|
|
120
120
|
* @param type - Event name (e.g. `"heartbeat"`, `"msg"`, `"DANMU_MSG"`).
|
|
121
|
-
* @param listener - Callback receiving a {@link
|
|
121
|
+
* @param listener - Callback receiving a {@link LaplaceRawEvent LaplaceRawEvent\<T\>}.
|
|
122
122
|
* @param options - Standard `addEventListener` options.
|
|
123
123
|
*/
|
|
124
|
-
on<T = unknown>(type: string, listener: (event:
|
|
124
|
+
on<T = unknown>(type: string, listener: (event: LaplaceRawEvent<T>) => void, options?: boolean | AddEventListenerOptions): void;
|
|
125
125
|
/**
|
|
126
126
|
* Unsubscribe a previously registered listener.
|
|
127
127
|
* Convenience wrapper around {@link EventTarget.removeEventListener}.
|
|
@@ -131,7 +131,7 @@ declare class Live extends EventTarget {
|
|
|
131
131
|
* @param listener - The same function reference passed to {@link on}.
|
|
132
132
|
* @param options - Standard `removeEventListener` options.
|
|
133
133
|
*/
|
|
134
|
-
off<T = unknown>(type: string, listener: (event:
|
|
134
|
+
off<T = unknown>(type: string, listener: (event: LaplaceRawEvent<T>) => void, options?: boolean | EventListenerOptions): void;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
/**
|
|
@@ -167,7 +167,7 @@ declare class KeepLive<Base extends typeof Live> extends EventTarget {
|
|
|
167
167
|
Base: Base;
|
|
168
168
|
constructor(Base: Base, ...params: ConstructorParameters<Base>);
|
|
169
169
|
/**
|
|
170
|
-
* Overridden to also dispatch a `
|
|
170
|
+
* Overridden to also dispatch a `LaplaceRawEvent<Event>` with type `"event"`
|
|
171
171
|
* for every event, enabling catch-all listeners.
|
|
172
172
|
*/
|
|
173
173
|
dispatchEvent(event: Event): boolean;
|
|
@@ -199,14 +199,14 @@ declare class KeepLive<Base extends typeof Live> extends EventTarget {
|
|
|
199
199
|
*/
|
|
200
200
|
send(data: Uint8Array): void;
|
|
201
201
|
/**
|
|
202
|
-
* Subscribe to an event type with a typed {@link
|
|
202
|
+
* Subscribe to an event type with a typed {@link LaplaceRawEvent} listener.
|
|
203
203
|
*
|
|
204
204
|
* @typeParam T - Expected data type carried by the event.
|
|
205
205
|
* @param type - Event name (e.g. `"heartbeat"`, `"msg"`, `"DANMU_MSG"`).
|
|
206
|
-
* @param listener - Callback receiving a {@link
|
|
206
|
+
* @param listener - Callback receiving a {@link LaplaceRawEvent LaplaceRawEvent\<T\>}.
|
|
207
207
|
* @param options - Standard `addEventListener` options.
|
|
208
208
|
*/
|
|
209
|
-
on<T = unknown>(type: string, listener: (event:
|
|
209
|
+
on<T = unknown>(type: string, listener: (event: LaplaceRawEvent<T>) => void, options?: boolean | AddEventListenerOptions): void;
|
|
210
210
|
/**
|
|
211
211
|
* Unsubscribe a previously registered listener.
|
|
212
212
|
*
|
|
@@ -215,7 +215,7 @@ declare class KeepLive<Base extends typeof Live> extends EventTarget {
|
|
|
215
215
|
* @param listener - The same function reference passed to {@link on}.
|
|
216
216
|
* @param options - Standard `removeEventListener` options.
|
|
217
217
|
*/
|
|
218
|
-
off<T = unknown>(type: string, listener: (event:
|
|
218
|
+
off<T = unknown>(type: string, listener: (event: LaplaceRawEvent<T>) => void, options?: boolean | EventListenerOptions): void;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
/**
|
|
@@ -231,7 +231,7 @@ type WSOptions = LiveOptions & {
|
|
|
231
231
|
*
|
|
232
232
|
* Wraps a native {@link WebSocket}, wiring its lifecycle events (`open`,
|
|
233
233
|
* `message`, `close`, `error`) into the {@link Live} event system. Binary
|
|
234
|
-
* frames are forwarded as `
|
|
234
|
+
* frames are forwarded as `LaplaceRawEvent<Uint8Array>` for protocol decoding.
|
|
235
235
|
*
|
|
236
236
|
* Not typically instantiated directly — use {@link LiveWS} (server) or the
|
|
237
237
|
* browser-specific `LiveWS` which inject the appropriate inflate
|
|
@@ -247,4 +247,4 @@ declare class LiveWSBase extends Live {
|
|
|
247
247
|
constructor(inflates: Inflates, roomid: number, { address, ...options }?: WSOptions);
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
export {
|
|
250
|
+
export { type Inflates as I, KeepLive as K, Live as L, type WSOptions as W, type LiveOptions as a, LiveWSBase as b, LaplaceRawEvent as c };
|