Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Add
@scope
tag which behaves identically to the existing@access
tag.Q&A
Details
Motivation
Add an
@scope
tag such that methods and members can have scope defined using a generic tag in the same way that methods and members can have access defined using the existing@access
tag.Changes
This change is just a direct copy of the existing definition of the
@access
tag which may be found here. No changes were made to the functionality of the tag other than to change the tag name, and change the allowed string values in the regex to the set of allowable scope types as defined by the doclet shcema and jsdoc-core names. Case insensitive regex expression was preserved to maintain the behaviour of the existing@access
tag which can take access values of mixed cases.Testing
I could not find any tag-specific tests for the existing
@access
tag, and since the changes are a essentially a direct copy of the existing jsdoc I did not include tests of any kind.To verify the behaviour of the changes, I directly added them to the node_modules files in an existing repository using jsdoc (I found this to be quicker and simpler than trying to point to the changed branch). I verified the change by checking the output in generated documentation files, and by inspecting the doclet/ast output using a placeholder plugin with a handler for the
parseComplete
event. The tag definition was added to thebaseTag
object exported bynode_modules/jsdoc/tag/dictionary/definition.js
, the object was altered as follows to test changes: