Context
I was trying to create and use a compound index based from the docs: https://spacetimedb.com/docs/tables/indexes#multi-column-queries but was stopped by a type error or type inference issue.
Steps to reproduce:
- run cli command
spacetime init -t nuxt-ts to create a nuxt template project
- add a table level index in the
person table
const spacetimedb = schema({
person: table(
{
public: true,
indexes: [
{ name: "test_idx", algorithm: "btree", columns: ["name"] },
...
]
}
- use the index in a reducer
export const sayHello = spacetimedb.reducer((ctx) => {
ctx.db.person.test_idx; // type error: Property 'test_idx' does not exist on type ...
...
}
version: spacetime v2.0.2