You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a user is working with a non-typescript project, they simply cannot use the bindings generated by spacetimedb. Hence, we should generate .js files as bindings. We can type the files in 2 ways:
JSDoc: JSDoc are types-in-comments, and work well too!
.js + .d.ts: THis will be a bit more complicated, but it requires generating 2 files, .js with all the logic, and .d.ts with the correct types specified, TypeScript will automatically combine the two while checking.
Best of both worlds
We scan through user's files and if we see .ts files, we generate .ts by default. Otherwise switch to .js(or .js+.d.ts). Can be overriden by a CLI flag (--use-typescript)
The text was updated successfully, but these errors were encountered:
If a user is working with a non-typescript project, they simply cannot use the bindings generated by spacetimedb. Hence, we should generate .js files as bindings. We can type the files in 2 ways:
Best of both worlds
We scan through user's files and if we see .ts files, we generate .ts by default. Otherwise switch to .js(or .js+.d.ts). Can be overriden by a CLI flag (--use-typescript)
The text was updated successfully, but these errors were encountered: