clockworklabs / clockworklabs/SpacetimeDB
Typescript SDK Import file for tables
@cloutiertyler is already working on this.
Since Sep 30, 2024.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.