Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Conversation

Alhadis
Copy link
Contributor

@Alhadis Alhadis commented Sep 21, 2017

This PR updates the JSDoc grammar with new tags added in v3.5.0, and also fixes a few omissions for Closure Compiler related stuff.

The notes of each commit contain details and references:

  • [7c0699f2e] Add @polymer and @polymerBehavior JSDoc tags
  • [6685c1a9c] Allow curly brackets to be used in some JSDoc tags
  • [1524164e5] Add support for JSDoc 3.5.0 tags

Alhadis added 3 commits September 21, 2017 15:59
These tags are used for marking objects with Polymer-specific semantics.
Used by Closure Compiler when executed with `--polymer_pass=2`.

Source: https://git.io/v5jo4
Closure Compiler permits or requires curly brackets around {Type} tokens
that follow certain JSDoc tags. Specifically:

    /**
     * @export {SomeType}
     * @extends {goog.ds.BasicNodeList}
     * @Lends {objectName}
     * @Modifies {this}
     * @this {Widget}
     */

See: https://github.com/google/closure-compiler/wiki
This adds support for the @Generator, @yield, and @hideconstructor tags:

    class CompleteExample {

        /** @hideconstructor */
        constructor() { }

        /**
         * Generate numbers in the Fibonacci sequence.
         * @Generator
         * @yields {Number} The next number in the Fibonacci sequence.
         */
        * fibonacci(){
            yield 41.999999999;
        }
    }

See:
* http://usejsdoc.org/tags-generator.html
* http://usejsdoc.org/tags-yields.html
* http://usejsdoc.org/tags-hideconstructor.html
@winstliu winstliu merged commit d929689 into atom:master Sep 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants