1 Reply
This is not a bug, but is a limitation due to
v.id()
being used in schema definitions as well as argument validators. Ideally the type of v.id
depends on the tables defined in your schema, but this becomes circular when using v.id
in schema definitions.
While you don't get the auto-complete, TS will usually point out typos (e.g. v.id("myTabel")
) once you pass the ID into any of the methods on ctx.db
.
If you want the auto-complete + type safety for argument validators, you can make something like
that depends on the types generated from your schema.