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

Reference doc makes constructor parameters unclear #1114

Closed
kring opened this issue Sep 4, 2013 · 3 comments
Closed

Reference doc makes constructor parameters unclear #1114

kring opened this issue Sep 4, 2013 · 3 comments

Comments

@kring
Copy link
Member

kring commented Sep 4, 2013

image

This constructor has one required parameter, imageryProvider, and also a description that allows additional parameters to be specified. This is clear from looking at the source code, but not from the documentation. I was just talking to a user within AGI that tried a bunch of different variations before figuring out how to correctly call this constructor, and had similar problems with other APIs.

One easy improvement would be to list the names of the parameters. So change new ImageryLayer in the screenshot above to new ImageryLayer(imageryProvider, description). This should be done for methods, too, not just constructors.

@pjcozzi pjcozzi added the 1.0 label May 8, 2014
@pjcozzi
Copy link
Contributor

pjcozzi commented May 21, 2014

@shunter @kring this requires a change to the JDoc template, right?

@kring
Copy link
Member Author

kring commented May 21, 2014

this requires a change to the JDoc template, right?

I don't know, but I can imagine this would be the case.

@mramato
Copy link
Contributor

mramato commented May 21, 2014

JSDoc (at least the latest version which @shunter is upgrading too) can support documentation of anonymous objects like this, so description would more clearly show up as a single object parameter with better documentation. I don't know all of the details, but it's worth looking into after we finish the upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants