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

[BUG] @ignore and @internal not working in some cases #1101

Closed
stefan-schweiger opened this issue Jul 15, 2021 · 4 comments
Closed

[BUG] @ignore and @internal not working in some cases #1101

stefan-schweiger opened this issue Jul 15, 2021 · 4 comments

Comments

@stefan-schweiger
Copy link

Overview of the issue

For the most part @ignored and @internal work expected, but I've identified 2 cases where they don't. The first one is if you use /** @internal */ with @Input or @Output:

/** @internal */
@Input()
public internalInputProp: string = '';

Still gets generated (see below, it even recogniced the jsdoc tag), but /** @ignore */ or removing @Input() lead to the property correctly being omitted.

{
  "name": "internalInputProp",
  "defaultValue": "''",
  "deprecated": false,
  "deprecationMessage": "",
  "jsdoctags": [
      {
          "pos": 344,
          "end": 354,
          "flags": 4227072,
          "modifierFlagsCache": 0,
          "transformFlags": 0,
          "kind": 317,
          "tagName": {
              "pos": 345,
              "end": 353,
              "flags": 4227072,
              "modifierFlagsCache": 0,
              "transformFlags": 0,
              "kind": 78,
              "escapedText": "internal"
          },
          "comment": ""
      }
  ],
  "line": 24,
  "type": "string"
}

The other case is when you set /** @ignore */ or /** @internal */ on constructor properties:

constructor(
  /** @internal */ public internalConstructorProp: string = '',
  /** @ignored */ public ignoredConstructorProp: string = ''
) {}

This time both of those properties will get generated and again the jsdoc tags are included in the generated JSON.

Reproduce the error

Reproduction:
https://github.com/stefan-schweiger/compodoc-repro/tree/ignore-internal-bug

Just run npm run docs:json and look in the generated documentation.json for internalInputProp, internalConstructorProp and ignoredConstructorProp.

@vogloblinsky vogloblinsky added this to the 1.1.15 milestone Jul 15, 2021
@vogloblinsky vogloblinsky modified the milestones: 1.1.15, 1.1.16 Sep 15, 2021
@vogloblinsky vogloblinsky modified the milestones: 1.1.16, 1.1.17 Nov 17, 2021
@vogloblinsky vogloblinsky modified the milestones: 1.1.17, 1.1.18 Dec 6, 2021
@vogloblinsky vogloblinsky modified the milestones: 1.1.18, 1.1.19 Jan 10, 2022
@vogloblinsky vogloblinsky changed the title [BUG] @ignored and @internal not working in some cases [BUG] @ignore and @internal not working in some cases Feb 9, 2022
@vogloblinsky
Copy link
Contributor

@stefan-schweiger did you use --disableInternal option ?

@stefan-schweiger
Copy link
Author

@vogloblinsky I would need to look that up for my production project, but the reproduction in my original comment should include everything 😉

@stefan-schweiger
Copy link
Author

Just looked, the repro uses --disableInternal --disableProtected --disablePrivate

@vogloblinsky
Copy link
Contributor

Ok seems fixed.

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

No branches or pull requests

2 participants