-
Notifications
You must be signed in to change notification settings - Fork 107
Filled out remaining tags documentation. #15
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
Conversation
I had a few questions while I was writing up:
|
I don't see why a namespace shouldn't be allowed to have a type. /**
@namespace {Number} one
*/
var one = new Number(1);
/**
@method one.add
*/
one.add = function (n) { return n + 1; } A more likely usage is a function that also acts like a namespace. These are popularly given names which look like punctuation or currency in my experience. |
Yes, the quotes can be used when a namepath has stringy bits. Like window["!"] = function (msg) { alert(msg); }
window["!"]("Code Red!"); This feature was specifically asked for in version 2. Specifically by whom, I cannot recall. |
Great, I'll add these examples to the docs and add a couple more commits. Can you give an example of the "more likely usage" of a namespace being a function? (I have absolutely no experience with JS when it has to do with the web - I come from a GNOME JS background - so am not really sure what this means). Do you mean something like The quote feature seems straightforward enough, I'll add a note to it on the @name page and possibly the @link/namepaths page. |
…cles. e.g. {@link chat."#channel"}.
I find myself referencing this pull request more than the current tags documentation! Any timeline on when this will get merged? |
@danielellis: Very soon. Doc updates are next on my list. |
I've made a lot of headway on the review. Should be able to merge this (at last!!) next weekend, if not sooner. |
👍 You da man |
This has finally been merged. @mathematicalcoffee, thanks once again for your heroic effort! The JSDoc community will benefit tremendously from all of your hard work. I made a bunch of edits before I merged the changes, mostly for clarity and brevity. I also made some of the examples more concrete and removed some of the examples that focus on edge cases. In addition, I did a bit of editing for consistency in terms of where we use /**
* This is a JSDoc comment.
* @class
*/
function MyClass() {} I also made a very small number of corrections; for example, it appears to me that the parser ignores the @mathematicalcoffee, if you have questions or concerns about any of my edits, please feel free to email me directly or file new issues. |
I've filled out the tags documentation for all the remaining JSDoc tags except:
I accidentally did tags-inner (also done in #13) and committed it (3fe4ebe) so I've left it in for now. Feel free to write over it with the changes from #13.
I think the only clashes with #13 will be tags-inner (as already mentioned), index.html (which can just be regenerated).
But there are probably quite a few clashes with #12 due to the line endings - might make sense for #12 to be merged before this one. (This will probably screw around with all the line ending settings though - all files have retained their original line endings, and files that I have created have Linux line endings).
Also, for now I have not made a page for @Undocumented. I'm torn between adding it for completeness (with a caveat "this is for use internally by JSDoc, you should use @ignore instead"), and leaving it out since just JSDoc uses it internally. I lean towards the former because I could imagine someone seeing the tag definition in the JSDoc source and wondering what it does. I have the tags-undocumented page prepared and can commit it to this branch if you agree.