Skip to content

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

Closed

Description

@stefan-schweiger
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.

Activity

  1. added this to the 1.1.15 milestone on Jul 15, 2021
  2. modified the milestones: 1.1.15, 1.1.16 on Sep 15, 2021
  3. modified the milestones: 1.1.16, 1.1.17 on Nov 17, 2021
  4. modified the milestones: 1.1.17, 1.1.18 on Dec 6, 2021
  5. modified the milestones: 1.1.18, 1.1.19 on Jan 10, 2022
  6. changed the title [-][BUG] `@ignored` and `@internal` not working in some cases[/-] [+][BUG] `@ignore` and `@internal` not working in some cases[/+] on Feb 9, 2022
  7. vogloblinsky commented on Feb 10, 2022

    @vogloblinsky
    Contributor

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

  8. stefan-schweiger commented on Feb 10, 2022

    @stefan-schweiger
    Author

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

  9. stefan-schweiger commented on Feb 10, 2022

    @stefan-schweiger
    Author

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

  10. vogloblinsky commented on Feb 10, 2022

    @vogloblinsky
    Contributor

    Ok seems fixed.

  11. added a commit that references this issue on Jul 15, 2024
    18da1fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions