typescript-server
Installation
SKILL.md
SpacetimeDB TypeScript SDK Reference
Module Structure
Tables are built with table(), bound with schema(), and exported as default. Reducers and lifecycle hooks are export const:
import { schema, table, t } from 'spacetimedb/server';
const scoreRecord = table(
{ name: 'score_record', public: true },
{
id: t.u64().primaryKey().autoInc(),
owner: t.identity(),
value: t.u32(),
}
);