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

Decorating method parameters with since or new #480

Closed
ryan-nauman opened this issue Oct 22, 2013 · 3 comments
Closed

Decorating method parameters with since or new #480

ryan-nauman opened this issue Oct 22, 2013 · 3 comments

Comments

@ryan-nauman
Copy link

We've had a few releases where new parameters have been added to our methods. We call them out in a guide but it would be nice if we could decorate these with new/since tags. I don't have any great ideas as to how this could be displayed in the output. It seems like it would add a lot of noise to the parameters section but maybe a subtle icon or tooltip for new parameters could be a solution.

What do you think?

@nene
Copy link
Member

nene commented Oct 23, 2013

This has been suggested before.

Using @since tags for parameters is problematic, but I actually think the use of explicit @since tags in general is problematic. A much better approach is to let JSDuck do the comparison of source code from different versions, and produce the since-data automatically. (I think this whole --import feature is severely under-documented).

So, it would be feasible to produce the version data for parameters automatically. But adding this information explicitly feels noisy.

@nene
Copy link
Member

nene commented Oct 23, 2013

I went ahead and implemented automatic generation of this data for parameters:

since-screen

As can be seen, the version info is only shown when the parameter was introduced in a later version than the method itself.

@nene
Copy link
Member

nene commented Oct 28, 2013

It's now merged into jsduck master and will be part of the next release. 3916999

@nene nene closed this as completed Oct 28, 2013
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

No branches or pull requests

2 participants