Skip to content

Conversation

cloutiertyler
Copy link
Contributor

@cloutiertyler cloutiertyler commented Oct 4, 2025

Description of Changes

This resolves an issue reported in Discord:

https://discordapp.com/channels/1037340874172014652/1398209084699709492/1423784670402842766

note the name is Counter. in the typescript bindings, my useTable only gives me the option for counter => useTable<DbConnection, Counter>('counter');
I switched my name in the c# module to [SpacetimeDB.Table(Public = true, Name = "counter")] and it just works.
Capitalization and whatnot strikes again

The diff seems large because of the mechanical changes to codegen. You only really need to review code gen'd tables and index.ts. All the other files just have a new __TableHandle type import.

API and ABI breaking changes

Technically API breaking, but it fixes a bug where the old API doesn't work

Expected complexity level and risk

2, relatively straight-foward changes to the TS SDK and TS codegen

Testing

  • I have tested with a Rust module that has an UpperCase table, that that name is passed correctly down to the TypeScript client through the codegen and that it works in useTable

Signed-off-by: Tyler Cloutier <[email protected]>
Copy link
Contributor

@JulienLavocat JulienLavocat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cloutiertyler cloutiertyler added this pull request to the merge queue Oct 4, 2025
github-merge-queue bot pushed a commit that referenced this pull request Oct 4, 2025
…e for `useTable` in TypeScript (#3354)

# Description of Changes

This resolves an issue reported in Discord:


https://discordapp.com/channels/1037340874172014652/1398209084699709492/1423784670402842766

> note the name is Counter. in the typescript bindings, my useTable only
gives me the option for counter => useTable<DbConnection,
Counter>('counter');
> I switched my name in the c# module to [SpacetimeDB.Table(Public =
true, Name = "counter")] and it just works.
> Capitalization and whatnot strikes again

The diff seems large because of the mechanical changes to codegen. You
only really need to review code gen'd tables and `index.ts`. All the
other files just have a new `__TableHandle` type import.

# API and ABI breaking changes

Technically API breaking, but it fixes a bug where the old API doesn't
work

# Expected complexity level and risk

2, relatively straight-foward changes to the TS SDK and TS codegen

# Testing

- [x] I have tested with a Rust module that has an `UpperCase` table,
that that name is passed correctly down to the TypeScript client through
the codegen and that it works in `useTable`

---------

Signed-off-by: Tyler Cloutier <[email protected]>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 4, 2025
@bfops bfops added the release-any To be landed in any release window label Oct 6, 2025
@cloutiertyler cloutiertyler added this pull request to the merge queue Oct 7, 2025
Merged via the queue into master with commit 2271dbd Oct 7, 2025
36 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-any To be landed in any release window

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants