TypeDoc no longer outputs decorator information?

This issue has been tracked since 2023-01-31.

I'm not sure if this is a bug or if it is related to changes in Typescript itself, but we've used TypeDoc json output to help us generate documentation for an Angular component library for years. Unfortunately though, with the latest round of updates, TypeDoc seems to no longer be outputting decorator information. I saw no mention of a change related to this in the changelog.

This diminishes the usefulness of our documentation, so I wanted to check if anyone here might know how feasible it would be to get this functionality back. Am I just missing a special flag? Should we finally move on to custom AST parsing?

Expected Behavior

Previously decorator information for both classes and properties (and possibly methods) would be included like so:

Actual Behavior

Not a single decorators section exists in TypeDoc json output anymore.

Steps to reproduce the bug

Simply run typedoc configured to document any Angular component. Something like below in a fresh Angular CLI app:

npx typedoc --tsconfig ./tsconfig.json --json out.json --entryPointStrategy expand ./src/app

The output contains no decorator information.

This was during a project-wide update to Angular 15.x.x which requires Typescript 4.8.x+. This problem seems to happen with the latest TypeDoc version 0.23.24 and even the previous version we were on before the update ^0.21.0.

So I suspect the problem might have been a change in Typescript? Perhaps to do with changes in preparation of the tc39 decorators proposal?


  • Typedoc version: 0.21.0 -> 0.23.24
  • TypeScript version: 4.8.x+
  • Node.js version: 16.19.0
  • OS: MacOS 12.6.2
Gerrit0 wrote this answer on 2023-02-02

reflection.decorates, reflection.decorators, and their corresponding interfaces have been removed as no code in TypeDoc used them.

In the 0.23.0 release notes.

I believe it may have been broken with newer TS versions before then. It wasn't ever properly tested, and TS has made several changes to how decorators are parsed/where they are located in the ast. I don't plan on adding support for it again without some way to display it in the default theme. I haven't tackled it because it means either including stringified arguments in typedoc's modem (ew), ignoring arguments (also probably not a good idea), or including the ast and serialization/deserialization for that (way too much code)

hrmcdonald wrote this answer on 2023-02-02

If anyone else finds themselves here for this very specific, niche use case. We were able to recreate most of the same output we previously pulled from Typdoc results from CompoDocs json output which is more suited for this specific task anyways.

Thanks for the quick response though @Gerrit0, you can close this.

Gerrit0 wrote this answer on 2023-02-02

👍 compodoc is probably a better solution for angular projects anyways, typedoc's goal is really to create documentation for libraries, not applications

More Details About Repo
Owner Name TypeStrong
Repo Name typedoc
Full Name TypeStrong/typedoc
Language TypeScript
Created Date 2014-05-24
Updated Date 2023-03-19
Star Count 6487
Watcher Count 68
Fork Count 639
Issue Count 48


Issue Title Created Date Updated Date