@@ -1731,6 +1731,84 @@ export class LoggedOutPlayerTableHandle<TableName extends string> implements __T
17311731 return this .tableCache .removeOnUpdate (cb );
17321732 }}
17331733' ' '
1734+ "my_player_table.ts" = ' ' '
1735+ // THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
1736+ // WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
1737+
1738+ /* eslint-disable */
1739+ /* tslint:disable */
1740+ import {
1741+ AlgebraicType as __AlgebraicTypeValue ,
1742+ BinaryReader as __BinaryReader ,
1743+ BinaryWriter as __BinaryWriter ,
1744+ ClientCache as __ClientCache ,
1745+ ConnectionId as __ConnectionId ,
1746+ DbConnectionBuilder as __DbConnectionBuilder ,
1747+ DbConnectionImpl as __DbConnectionImpl ,
1748+ Identity as __Identity ,
1749+ SubscriptionBuilderImpl as __SubscriptionBuilderImpl ,
1750+ TableCache as __TableCache ,
1751+ TimeDuration as __TimeDuration ,
1752+ Timestamp as __Timestamp ,
1753+ deepEqual as __deepEqual ,
1754+ type AlgebraicType as __AlgebraicTypeType ,
1755+ type AlgebraicTypeVariants as __AlgebraicTypeVariants ,
1756+ type CallReducerFlags as __CallReducerFlags ,
1757+ type ErrorContextInterface as __ErrorContextInterface ,
1758+ type Event as __Event ,
1759+ type EventContextInterface as __EventContextInterface ,
1760+ type ReducerEventContextInterface as __ReducerEventContextInterface ,
1761+ type SubscriptionEventContextInterface as __SubscriptionEventContextInterface ,
1762+ type TableHandle as __TableHandle ,
1763+ } from " spacetimedb" ;
1764+ import { Player } from " ./player_type" ;
1765+ import { type EventContext , type Reducer , RemoteReducers , RemoteTables } from " ." ;
1766+ declare type __keep = [EventContext , Reducer , RemoteReducers , RemoteTables ];
1767+
1768+ /**
1769+ * Table handle for the table `my_player`.
1770+ *
1771+ * Obtain a handle from the [`myPlayer`] property on [`RemoteTables`],
1772+ * like `ctx.db.myPlayer`.
1773+ *
1774+ * Users are encouraged not to explicitly reference this type,
1775+ * but to directly chain method calls,
1776+ * like `ctx.db.myPlayer.on_insert(...)`.
1777+ */
1778+ export class MyPlayerTableHandle <TableName extends string > implements __TableHandle <TableName > {
1779+ // phantom type to track the table name
1780+ readonly tableName ! : TableName ;
1781+ tableCache: __TableCache <Player >;
1782+
1783+ constructor (tableCache : __TableCache <Player >) {
1784+ this .tableCache = tableCache ;
1785+ }
1786+
1787+ count(): number {
1788+ return this .tableCache .count ();
1789+ }
1790+
1791+ iter(): Iterable <Player > {
1792+ return this .tableCache .iter ();
1793+ }
1794+
1795+ onInsert = (cb : (ctx : EventContext , row : Player ) => void ) => {
1796+ return this .tableCache .onInsert (cb );
1797+ }
1798+
1799+ removeOnInsert = (cb : (ctx : EventContext , row : Player ) => void ) => {
1800+ return this .tableCache .removeOnInsert (cb );
1801+ }
1802+
1803+ onDelete = (cb : (ctx : EventContext , row : Player ) => void ) => {
1804+ return this .tableCache .onDelete (cb );
1805+ }
1806+
1807+ removeOnDelete = (cb : (ctx : EventContext , row : Player ) => void ) => {
1808+ return this .tableCache .removeOnDelete (cb );
1809+ }
1810+ }
1811+ ' ' '
17341812"namespace_test_c_type.ts" = ' ' '
17351813// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
17361814// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
0 commit comments