Skip to content

Export Range/Bound from the spacetimedb/server in the Typescript sdk#4567

Open
dusk125 wants to merge 5 commits intoclockworklabs:masterfrom
dusk125:export-range
Open

Export Range/Bound from the spacetimedb/server in the Typescript sdk#4567
dusk125 wants to merge 5 commits intoclockworklabs:masterfrom
dusk125:export-range

Conversation

@dusk125
Copy link

@dusk125 dusk125 commented Mar 5, 2026

Description of Changes

This change exports the Range (and Bound) types so that ranged filtering can be done from Typescript modules. I chose to do export * so that both Range and Bounds are included and I chose to not export as types since the user will need to instantiate a Range for use in a query

API and ABI breaking changes

None

Expected complexity level and risk

1
It seems like this export was just missed as the documentation for range queries makes reference to them, but I was unable to import them as it recommends (or at all)

Testing

At the time of writing, I haven't tested the fix yet, I'll see if I can get a local copy of spacetime built and validate I can now imports Ranges.

@CLAassistant
Copy link

CLAassistant commented Mar 5, 2026

CLA assistant check
All committers have signed the CLA.

@cloutiertyler
Copy link
Contributor

@dusk125 Could you make these explicit exports please? If so I can merge it!

@clockwork-labs-bot
Copy link
Collaborator

@dusk125 Tyler's asking for explicit exports instead of export *. The range module exports two things, so the change would be:

-export * from './range';
+export { Range } from './range';
+export type { Bound } from './range';

(Bound is a type alias, so export type is the right form for it.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants