update examples and add documentation
This commit is contained in:
1 parent
9e4e019660
commit
e42d897d41
7 files changed
+34
-21
No files matched your search
@@ -22,7 +22,7 @@ type OpArgsMapping = {
|
||||
};
|
||||
|
||||
class WebSocketClient {
|
||||
public op<TOp extends OpCode, TArgs extends OpArgsMapping[TOp]>(
|
||||
public send<TOp extends OpCode, TArgs extends OpArgsMapping[TOp]>(
|
||||
op: TOp,
|
||||
args: TArgs,
|
||||
) {
|
||||
@@ -32,5 +32,5 @@ class WebSocketClient {
|
||||
|
||||
function main_ws() {
|
||||
const client = new WebSocketClient();
|
||||
client.op(OpCode.PING, {});
|
||||
client.send(OpCode.PING, {});
|
||||
}
|
||||
Reference in new issue
Block a user