Skip to content

[BUG] Inputs and outputs not detected when using additional decorator in component #1130

@sanisoclem

Description

@sanisoclem
Overview of the issue

When using the @UntilDestroy decorator before @Component() decorator, the inputs and outputs are not detected/empty. Properties, methods and @Viewchild's are populated properly. If I switch the order of the decorators (i.e., @Component({..}) @UntilDestroy() export class ...), then the inputs and outputs are properly detected. Switching the order of the decorators won't work though because @UntilDestroy() needs to go first.

Operating System, Node.js, npm, compodoc version(s)

windows 10
node v14.18.0
npm v6.14.15
compodoc v1.1.15

Angular configuration, a package.json file in the root folder
{
  "scripts": {
    "prepare": "husky install",
    "nx": "nx",
    "prebuild": "nx affected --target=patch-version --all",
    "build": "nx affected --target=build --all",
    "postbuild": "nx affected --target=package-wc --all",
    "test": "nx affected:test --all",
    "lint": "nx affected:lint --all",
    "compodoc": "compodoc",
    "affected:patch-version": "nx affected --target=patch-version",
    "affected:package-wc": "nx affected --target=package-wc",
    "affected:apps": "nx affected:apps",
    "affected:libs": "nx affected:libs",
    "affected:build": "nx affected:build --configuration=production",
    "affected:e2e": "nx affected:e2e",
    "affected:test": "nx affected:test --watch=false --browsers=ChromeHeadless --code-coverage",
    "affected:lint": "nx affected:lint",
    "affected:dep-graph": "nx affected:dep-graph",
    "affected": "nx affected",
    "update": "ng update @nrwl/workspace",
    "update:check": "ng update",
    "dep-graph": "nx dep-graph",
    "workspace-schematic": "nx workspace-schematic",
    "help": "nx help",
    "postinstall": "node ./decorate-angular-cli.js && ngcc --properties es2015 browser module main"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~12.2.8",
    "@angular/cdk": "^11.2.13",
    "@angular/common": "~12.2.8",
    "@angular/compiler": "~12.2.8",
    "@angular/core": "^12.2.8",
    "@angular/elements": "^12.2.8",
    "@angular/forms": "^12.2.8",
    "@angular/localize": "^12.2.8",
    "@angular/platform-browser": "^12.2.8",
    "@angular/platform-browser-dynamic": "~12.2.8",
    "@angular/router": "~12.2.8",
    "@fortawesome/fontawesome-pro": "^5.13.0",
    "@ng-bootstrap/ng-bootstrap": "^10",
    "@ngneat/until-destroy": "^8.1.4",
    "@nrwl/angular": "12.9.0",
    "@nrwl/workspace": "12.9.0",
    "@types/googlemaps": "^3.39.3",
    "bootstrap": "^4",
    "rxjs": "~6.5.4",
    "text-mask-addons": "^3.8.0",
    "tslib": "^2.3.1",
    "uuid": "^8.3.2",
    "zone.js": "^0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^12.2.8",
    "@angular-eslint/eslint-plugin": "~12.3.0",
    "@angular-eslint/eslint-plugin-template": "~12.3.0",
    "@angular-eslint/template-parser": "~12.3.0",
    "@angular/cli": "^12.2.8",
    "@angular/compiler-cli": "~12.2.8",
    "@angular/language-service": "~12.2.8",
    "@ngneat/spectator": "^8",
    "@nrwl/cypress": "12.9.0",
    "@nrwl/eslint-plugin-nx": "12.9.0",
    "@nrwl/jest": "12.9.0",
    "@nrwl/linter": "12.9.0",
    "@nrwl/storybook": "^12.9.0",
    "@nrwl/workspace": "12.9.0",
    "@compodoc/compodoc": "^1.1.15",
    "@storybook/addon-actions": "^6.3.8",
    "@storybook/addon-links": "^6.3.8",
    "@storybook/addon-essentials": "~6.3.8",
    "@storybook/angular": "~6.3.8",
    "@storybook/builder-webpack5": "~6.3.8",
    "@storybook/manager-webpack5": "~6.3.8",
    "@storybook/preset-scss": "^1.0.3",
    "@types/faker": "^5",
    "@types/jasmine": "~3.6.0",
    "@types/jest": "26.0.24",
    "@types/node": "^12.12.32",
    "@types/uuid": "^8.3.1",
    "@typescript-eslint/eslint-plugin": "~4.28.3",
    "@typescript-eslint/parser": "~4.28.3",
    "css-loader": "^6.3.0",
    "cypress": "^8.3.0",
    "eslint": "^7.18.0",
    "eslint-config-prettier": "^8.3.0",
    "eslint-plugin-cypress": "^2.10.3",
    "eslint-plugin-prettier": "^4",
    "faker": "^5",
    "husky": "^7.0",
    "jasmine-core": "~3.8",
    "jasmine-marbles": "^0.6.0",
    "jasmine-spec-reporter": "~5.0.0",
    "jest": "27.0.3",
    "jest-junit": "^12.3.0",
    "jest-marbles": "^2.5.1",
    "jest-preset-angular": "9.0.7",
    "karma": "~6.3.4",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "karma-junit-reporter": "^2.0.1",
    "lint-staged": "^11",
    "ng-mocks": "^12.5.0",
    "ng-packagr": "^12.2.1",
    "prettier": "^2",
    "pretty-quick": "^3.1.1",
    "sass": "^1.42.1",
    "sass-loader": "^12.1.0",
    "style-loader": "^3.3.0",
    "ts-jest": "27.0.3",
    "typescript": "4.3.5"
  },
  "lint-staged": {
    "*.ts": [
      "eslint --fix"
    ]
  }
}
Compodoc installed globally or locally ?

installed locally.

If possible sourcecode of the file where it breaks
@UntilDestroy()
@Component({
  selector: 'test',
  template: `<div></div>`
})

export class TestComponent {
  @Input() thisIsNotDetected = false;
  @Output() thisIsAlsoNotDetected = new EventEmitter();
  thisWorks = true;

  thisAlsoWorks(): boolean{ return true; }
}
If possible your terminal logs before the error

N/A

Motivation for or Use Case

It should detect inputs/outputs even if I add additional decorators to the component.

Reproduce the error
  1. run compodoc on the file mentioned above.
  2. inputsClass and outputClass will both be empty even if there are inputs/outpus.
Related issues

None

Suggest a Fix

None

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions