Skip to content
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

Docs should display a return type for World:get() #83

Open
lolmanurfunny opened this issue Jun 28, 2024 · 4 comments
Open

Docs should display a return type for World:get() #83

lolmanurfunny opened this issue Jun 28, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed needs confirmation This doesn't seem right

Comments

@lolmanurfunny
Copy link
Contributor

Description

The documentation for World:get() is missing a return type. See World:remove() for reference.

Steps to reproduce

Go to the documentation.

@lolmanurfunny lolmanurfunny added the bug Something isn't working label Jun 28, 2024
@jackTabsCode
Copy link
Contributor

Where are you not seeing the return type?
image

The ... indicates that a variable number of arguments can be passed to the function. In this case, it'd be Component(s). It then shows ... for the return type, indicating you receive back to the components you pass.

The only thing I'd note is that you actually get instance(s) of a Component, and you pass the Component constructor(s), but most users have understood this so far.

@jackTabsCode jackTabsCode added documentation Improvements or additions to documentation question Further information is requested needs confirmation This doesn't seem right and removed bug Something isn't working question Further information is requested labels Jun 28, 2024
@LastTalon
Copy link
Member

There is definitely room for improvement in the docs with this sort of thing. I don't think it's the only instance, but part of what the docs signatures need to do is convey an intuitive understanding of what the functions do.

I wouldn't be opposed to people grooming the docs for things like this.

@LastTalon LastTalon added the help wanted Extra attention is needed label Jun 28, 2024
@lolmanurfunny
Copy link
Contributor Author

Sorry if the intent of this issue wasn't immediately clear. I'm just pointing out this minute inconsistency.

:get()
eSMSqYd5IN
:remove()
uYUMcCkcbe

@jackTabsCode
Copy link
Contributor

jackTabsCode commented Jul 2, 2024

I think the distinction between a component constructor and a component should be made more clear in the docs. There's a page that explains it, but immediately starts describing "patch" as a method on the constructor which doesn't make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed needs confirmation This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants