@eleven-am/pondsocket 0.1.131 → 0.1.132
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/channel/channel.js +1 -1
- package/package.json +1 -1
- package/types.d.ts +6 -6
package/channel/channel.js
CHANGED
|
@@ -112,7 +112,7 @@ class ChannelEngine {
|
|
|
112
112
|
(_a = __classPrivateFieldGet(this, _ChannelEngine_presenceEngine, "f")) === null || _a === void 0 ? void 0 : _a.removePresence(userId, graceful);
|
|
113
113
|
if (__classPrivateFieldGet(this, _ChannelEngine_parentEngine, "f").leaveCallback) {
|
|
114
114
|
__classPrivateFieldGet(this, _ChannelEngine_parentEngine, "f").leaveCallback({
|
|
115
|
-
userId,
|
|
115
|
+
id: userId,
|
|
116
116
|
assigns: user,
|
|
117
117
|
channel: new Channel(this),
|
|
118
118
|
});
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -37,13 +37,13 @@ type IncomingConnection<Path> = EventParams<Path> & {
|
|
|
37
37
|
address: string;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
interface LeaveEvent {
|
|
41
|
-
|
|
42
|
-
assigns:
|
|
43
|
-
channel: Channel
|
|
40
|
+
interface LeaveEvent<EventTypes extends PondEvenType = PondEvenType, PresenceType extends PondPresence = PondPresence, AssignType extends PondAssigns = PondAssigns> {
|
|
41
|
+
id: string;
|
|
42
|
+
assigns: AssignType;
|
|
43
|
+
channel: Channel<EventTypes, PresenceType, AssignType>;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
type LeaveCallback = (event: LeaveEvent) => void;
|
|
46
|
+
type LeaveCallback<EventTypes extends PondEvenType = PondEvenType, PresenceType extends PondPresence = PondPresence, AssignType extends PondAssigns = PondAssigns> = (event: LeaveEvent<EventTypes, PresenceType, AssignType>) => void;
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
type PondEvenType = { [key: string]: PondMessage };
|
|
@@ -393,7 +393,7 @@ export declare class PondChannel <EventType extends PondEvenType = PondEvenType,
|
|
|
393
393
|
* @desc Handles the leave event for a user, can occur when a user disconnects or leaves a channel, use this to clean up any resources
|
|
394
394
|
* @param callback - The callback to execute when a user leaves
|
|
395
395
|
*/
|
|
396
|
-
public onLeave (callback: LeaveCallback): void;
|
|
396
|
+
public onLeave (callback: LeaveCallback<EventType, PresenceType, AssignType>): void;
|
|
397
397
|
|
|
398
398
|
/**
|
|
399
399
|
* @desc Gets a channel by name
|