You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, you have to import every table in the typescript file where you use the spacetimedb client. You also need to use it somehow to stop typescript from compiling it out.
Currently in my react client for the multi-user dungeon I have this ugly mess:
import Player from "./types/player";
import Mobile from "./types/mobile";
import Location from "./types/location";
import World from "./types/world";
import Zone from "./types/zone";
import Room from "./types/room";
import RoomChat from "./types/room_chat";
import DirectMessage from './types/direct_message';
console.log(Player, Mobile, Location, World, Zone, Room, RoomChat, DirectMessage);
I’m not sure what the correct solution for this would be but we could possibly autogen a file that takes care of this for you so you only need to have a single import and it takes care of all of this for you.
The text was updated successfully, but these errors were encountered:
Currently, you have to import every table in the typescript file where you use the spacetimedb client. You also need to use it somehow to stop typescript from compiling it out.
Currently in my react client for the multi-user dungeon I have this ugly mess:
import Player from "./types/player";
import Mobile from "./types/mobile";
import Location from "./types/location";
import World from "./types/world";
import Zone from "./types/zone";
import Room from "./types/room";
import RoomChat from "./types/room_chat";
import DirectMessage from './types/direct_message';
console.log(Player, Mobile, Location, World, Zone, Room, RoomChat, DirectMessage);
I’m not sure what the correct solution for this would be but we could possibly autogen a file that takes care of this for you so you only need to have a single import and it takes care of all of this for you.
The text was updated successfully, but these errors were encountered: