Varun Singh
Varun Singh14mo ago

JSDoc for Convex Functions on Client

I currently document my Convex functions like the one attached. Is it possible this JSDoc could be part of the "api.participant.leaveCompetition" object (etc.) when I am using it on the client?
No description
8 Replies
Varun Singh
Varun SinghOP14mo ago
Or is this already possible, I just need to configure my IDE? I am using WebStorm and on the client I get these errors:
No description
ballingt
ballingt14mo ago
I see this in VSCode:
No description
ballingt
ballingt14mo ago
it seems TypeScript support works differently in WebStorm
Varun Singh
Varun SinghOP14mo ago
Ah, maybe I just need to configure something. I'll take a look
ballingt
ballingt14mo ago
Maybe there's some way to configure WebStorm to use the TypeScript language server That's what I use in Vim but I don't see the JSDoc (but I do get autocompletion, do you even have autocompletion on api.competition.listCompetitions?
ballingt
ballingt14mo ago
No description
ballingt
ballingt14mo ago
There are potential solutions to this, generally involving generating code instead of relying on TypeScript to pipe through the definitions.
Varun Singh
Varun SinghOP14mo ago
Figured it out: my front-end uses jsx instead of tsx even though my backend uses typescript. When I switch it to tsx it works

Did you find this page helpful?