That's about it - would love a schema for the JSON output.
Great idea! PRs welcome
I guess that answers my question. I'm currently working on building a small library of functions to quickly parse json output to aggregate the data for a given exported reactComponent. Currently I'm just having to explore the huge data tree that's exported and I'm slowly building up an understanding of it.
What would really help would be if someone could point me to the piece of source code that actually generates the json. I've spent a little time snooping through the source code but haven't turned up anything super usefull yet.
If I could see _how_ the json is generated that would really help me define accurate interfaces/types and their relationships for writing functions to parse and aggregate the data.
@StJohn3D The problem is that the the JSON is serialized in multiple classes so there isn't one place to look. There was some work to allow custom serializers which could be a more centralized place to look at types but that work was never fully integrated.
Thanks @aciccarello.
@benpolinsky After digging more I believe I've found the closest thing. Check out the models folder in this repo - it has exported class definitions for everything used to create the json output.
https://github.com/TypeStrong/typedoc/tree/master/src/lib/models
@StJohn3D Thanks! I've moved off the project I was utilizing TypeDoc for, but I'll forward the info along to that team.
While looking through the serialization, I found browser.ts which appears to define types for the JSON output.
However, these types are not used anywhere in TypeDoc's codebase, so they may be incorrect or outdated simply due to being forgotten. I'm hoping to correct this and increase the type safety of the serialization process relatively soon.
Most helpful comment
Great idea! PRs welcome