-
Notifications
You must be signed in to change notification settings - Fork 932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JS options when connecting the socket should be documented, and general JS documentation improvements #3361
Comments
Hi @srcrip, those are all very valid points you're raising here. Unfortunately the tl;dr is: neither Chris nor I actively do Typescript, therefore anything related to types isn't something we're working on. That said, we'd be happy to review PRs that do work on those topics. The main thing is that it shouldn't unnecessarily increase the maintenance burden on us "non Typescripties" though (see also #2892 (comment)).
If you work on a PR, we're happy to answer any questions coming up.
There was #3022 where I mentioned that the types aren't in the repo. Concerning moving them here: if the types only document the public interface that'd be fine, I think. Currently https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/phoenix_live_view/index.d.ts also includes lots of private functions not meant to be accessed from the outside. A PR that moved the types into the repo and cleans them up would probably be something we would accept. Before working on anything I'd wait for some feedback from @chrismccord though :) |
I think it would be a great improvement to move the public types into some kind of types.d.ts file here in the directory of the npm package (that would make it accessible when people use it in their editor). that's something I can work on. I'd personally love to see actual TypeScript itself, but I'm guessing that's probably unlikely? As for the documentation, I'm unsure if we can really like generate anything from the types themselves. They're probably still going to have to be maintained in two places. |
I would be happy to help out with any typing improvements, but currently don't have the capacity to do organising around it. So if there's any grunt work to be done, please reach out. Perhaps what svelte is doingl but in a more limited capacity, would be a good way to do it. My understanding is, they rely on jsdoc annotations to generate a type declaration, while the codebase is vanilla js. |
Hey everyone,
I noticed that I can not seem to find official documentation for the options to socket connection in JavaScript. I think we really need to document this in ex doc. Maybe it's there and I just missed it?
Also I am interested in taking a crack at the JS documentation overall. I think there should be a new page in the docs that covers:
I want to try writing this page but I'm not exactly sure of what some of those options on the live socket actually do. Also has anyone else thought about good ways to document JS functions in ex doc?
Addendum that I'm also curious about:
The text was updated successfully, but these errors were encountered: