Closed GaloisGirl closed 5 years ago
When running it on a file generated by Typedoc@0.14.0 which contains "type": "reflection", the following error is thrown:
"type": "reflection"
C:\Users\awroc\AppData\Roaming\npm\node_modules\type2docfx\dist\jsonTraverse.js:474 typeName: signatures.parameters[0].type.name, ^ TypeError: Cannot read property '0' of undefined
No error is thrown, output is generated.
Occurs in type2docfx@0.9.114. Occurs with typedoc@0.14.0 but not typedoc@0.13.0
The code expects indexSignature to be an object and not an array:
let signatures = type.declaration.indexSignature;
and:
typeName: signatures.parameters[0].type.name,
However, Typedoc generates an array since version 0.14.0: https://github.com/TypeStrong/typedoc/pull/721
I also ran into this issue, and fixed this with pull request #43. If that can be merged, it would be appreciated.
Thanks @greggbjensen , PR is merged and new version released, please have a try 😄
Actual behavior
When running it on a file generated by Typedoc@0.14.0 which contains
"type": "reflection"
, the following error is thrown:Expected behavior
No error is thrown, output is generated.
Versions
Occurs in type2docfx@0.9.114. Occurs with typedoc@0.14.0 but not typedoc@0.13.0
Cause
The code expects indexSignature to be an object and not an array:
let signatures = type.declaration.indexSignature;
and:
typeName: signatures.parameters[0].type.name,
However, Typedoc generates an array since version 0.14.0: https://github.com/TypeStrong/typedoc/pull/721