@clockworklabs/spacetimedb-typescript-sdk
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -84,2 +84,3 @@ /// <reference types="node" /> | ||
off(eventName: string, callback: (...args: any[]) => void): void; | ||
onConnect(callback: (...args: any[]) => void): void; | ||
} |
@@ -192,3 +192,2 @@ import { EventEmitter } from "events"; | ||
this.ws.onmessage = (message) => { | ||
console.log(message); | ||
const data = JSON.parse(message.data); | ||
@@ -256,3 +255,2 @@ if (data) { | ||
if (element.tableName) { | ||
console.log("Subscribe", element.tableName); | ||
this.ws.send(JSON.stringify({ "subscribe": { "query_strings": [element.tableName] } })); | ||
@@ -276,2 +274,5 @@ } | ||
} | ||
onConnect(callback) { | ||
this.on("connected", callback); | ||
} | ||
} | ||
@@ -278,0 +279,0 @@ window.__SPACETIMEDB__ = { |
{ | ||
"name": "@clockworklabs/spacetimedb-typescript-sdk", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A client for use in the EnglishAuction", | ||
@@ -5,0 +5,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63329
1676