Skip to content

Conversation

flrgh
Copy link
Contributor

@flrgh flrgh commented Dec 17, 2021

👋

This PR updates the annotations for lua-resty-websocket, adding docstrings and parameter definitions from the repo. The objects created by resty.websocket.server and resty.websocket.client are almost the same, so I factored out a lot of the common methods/fields into a class at resty.websocket.

I'm new to writing EmmyLua annotations for this language server and don't understand everything yet, so please let me know if there is anything that I should fix regarding formatting, naming conventions, etc. (I think it would be great if there were a contribution/style guide for 3rd party type definitions, to encourage other folks in the community to pitch in).

I do a lot of work on OpenResty, so if you like this PR I will probably follow-up with more :)

@CppCXY
Copy link
Member

CppCXY commented Dec 18, 2021

the basic resty annotation make by me , you can make pr for this too.
vscode emmylua codestyle plugin can be used for basic code style, this is not official advice

@flrgh
Copy link
Contributor Author

flrgh commented Dec 20, 2021

@CppCXY hi! Thanks for chiming in.

Should I submit duplicate PRs in both repos then?

@sumneko
Copy link
Collaborator

sumneko commented Dec 20, 2021

Thanks for your PR, and welcome to follow-up this!

@sumneko sumneko merged commit d1eda84 into LuaLS:master Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants