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

support @ignore tag #21

Closed
bennypowers opened this issue Jun 15, 2021 · 4 comments
Closed

support @ignore tag #21

bennypowers opened this issue Jun 15, 2021 · 4 comments

Comments

@bennypowers
Copy link
Member

bennypowers commented Jun 15, 2021

https://jsdoc.app/tags-ignore.html

The @ignore tag indicates that a symbol in your code should never appear in the documentation. This tag takes precedence over all others.

Given this source:

const priv = Symbol();
export class MyEl extends HTMLElement {
    f() { return this[priv](); }
    /** @ignore */
    [priv]() { return 'Hi, Pascal!'; }
}

I expect this output:

{
  "schemaVersion": "0.1.0",
  "readme": "",
  "modules": [
    {
      "kind": "javascript-module",
      "path": "src/my-element.js",
      "declarations": [
        {
          "kind": "class",
          "description": "",
          "name": "MyEl",
          "members": [
            {
              "kind": "method",
              "name": "f"
            }
          ],
          "superclass": {
            "name": "HTMLElement"
          },
          "customElement": true
        }
      ],
      "exports": [
        {
          "kind": "js",
          "name": "MyEl",
          "declaration": {
            "name": "MyEl",
            "module": "src/my-element.js"
          }
        }
      ]
    }
  ]
}

instead actual result is:

{
  "schemaVersion": "0.1.0",
  "readme": "",
  "modules": [
    {
      "kind": "javascript-module",
      "path": "src/my-element.js",
      "declarations": [
        {
          "kind": "class",
          "description": "",
          "name": "MyEl",
          "members": [
            {
              "kind": "method",
              "name": "f"
            },
            {
              "kind": "method",
              "name": "[priv]"
            }
          ],
          "superclass": {
            "name": "HTMLElement"
          },
          "customElement": true
        }
      ],
      "exports": [
        {
          "kind": "js",
          "name": "MyEl",
          "declaration": {
            "name": "MyEl",
            "module": "src/my-element.js"
          }
        }
      ]
    }
  ]
}
@thepassle
Copy link
Member

your sourcecode doesnt use the @ignore tag though 🌚

@bennypowers
Copy link
Member Author

my bad, just an oversight. updated the descrip

@claviska
Copy link

claviska commented Jul 7, 2021

@internal is also commonly used for the same purpose.

@thepassle
Copy link
Member

fixed in #91

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