@eleven-am/pondsocket 0.1.2 → 0.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eleven-am/pondsocket",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "PondSocket is a fast simple socket server",
5
5
  "keywords": [
6
6
  "socket",
@@ -1,5 +1,6 @@
1
1
  import {ResponsePicker} from "../pondBase";
2
- import {PondMessage, SendResponse, SocketCache} from "./types";
2
+ import {PondMessage, SendResponse} from "./types";
3
+ import {Channel} from "./channel";
3
4
 
4
5
  export declare abstract class PondResponse<T extends ResponsePicker = ResponsePicker.CHANNEL> {
5
6
  /**
@@ -24,15 +25,13 @@ export declare abstract class PondResponse<T extends ResponsePicker = ResponsePi
24
25
  abstract accept(assigns?: Partial<SendResponse<T>>): void;
25
26
  }
26
27
 
27
- export type PondChannelResponseHandler = (assigns: SendResponse, message?: { event: string, payload: PondMessage }) => void;
28
-
29
28
  export declare class ChannelResponse extends PondResponse {
30
29
 
31
- constructor(user: SocketCache, handler: PondChannelResponseHandler);
30
+ constructor(clientId: string, channel: Channel, resolver: (hasErrored: boolean) => void);
32
31
 
33
- accept(assigns: Partial<SendResponse<ResponsePicker.CHANNEL>> | undefined): void;
32
+ accept(assigns: Partial<SendResponse> | undefined): void;
34
33
 
35
34
  reject(message: string | undefined, errorCode: number | undefined): void;
36
35
 
37
- send(event: string, payload: PondMessage, assigns: Partial<SendResponse<ResponsePicker.CHANNEL>> | undefined): void;
36
+ send(event: string, payload: PondMessage, assigns: Partial<SendResponse> | undefined): void;
38
37
  }