mozilla / sphinx-js

Autodoc-style extraction into Sphinx for your JS project
https://pypi.python.org/pypi/sphinx-js/
MIT License
282 stars 81 forks source link

Fixed errors on convering typedoc JSON output to IR object #180

Open ruslankl9 opened 3 years ago

ruslankl9 commented 3 years ago

This is bugfix of converting typedoc json output. I found that KeyError: 'id' raising with 'extendedTypes' objects, not having 'id' key. This happens on processing code with extending classes like:

import { SomeClass } from 'module';

class MyClass extends SomeClass {
  //...
}

Also KeyError: 'sources' raising with Constructor kind when class definition doesn't have one. Example:

class SomeClass {}

In this case we are getting 'sources' value from the parent Class kind object.