-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.ts
38 lines (30 loc) · 964 Bytes
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* TODO: Implement class somewhere in this file that bundles multiple transport
* implementation into single `Protocol` implementation. This should be
* worked on once there will be multiple transports, currently there's
* only a WebSocket.
*/
export {
WebSocketProtocol as WebSocket,
WebSocketClose,
} from "#T/websocket";
export {
IpcProtocol as IPC
} from "#T/ipc";
export { RPCActivity } from "#C/packet";
export type {
Message,
UnknownMessage
} from "#C/packet";
export type {
HookFn,
HookSignatures
} from "#C/protocol";
import type { ServerDetails as GDetails } from "#C/server";
import type { Server as WS } from "ws";
import type { Server as IPC } from "node:net";
type WSServerDetails = GDetails<WS>;
type IPCServerDetails = GDetails<IPC>;
export type { WSServerDetails, IPCServerDetails };
/* For non-breaking compatibility with old WebSocket-only API. */
export type { WSServerDetails as ServerDetails };