-
-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mixins cause: TypeError: Cannot read property 'forEach' of undefined #1207
Comments
Due to an issue[1] in typedoc's mixin support, the documentation generation phase of the release process fails. This commit points the typedoc dependency to a custom fork[2] that contains a fix. We can and should back this change out later when mainline is fixed. [1] TypeStrong/typedoc#1207 [2] https://github.com/zslayton/typedoc/
This is really weird, my first instinct was that I really don't want to add checks for undefined when the TS declaration file claims it will never be undefined, but maybe the TS types are just wrong here? Looking more deeply into it. |
I'm beginning to think this is a TS bug... I've tried to reduce it to a smaller example but haven't been able to. For now I'll just merge the PR with a note that this is really weird and needs further investigation. |
I have a Typescript codebase that employs mixins.
Running
typedoc
fails with the following stack trace:The issue is caused by this code, reproduced here with slightly different formatting:
If I change it to:
then documentation is generated normally. I have not studied the code long enough to understand its intent, so I'm unsure if this change is the best approach.
This failure did not occur in my project until I started using mixins. Additionally, the code above was added in a PR to introduce mixin support.
Expected Behavior
Typedoc should finish generating documentation successfully.
Actual Behavior
Typedoc throws an Error, preventing documentation from being generated and causing CI builds to fail.
Steps to reproduce the bug
typedoc
config:Environment
Laptop
Here's a link to the failing Travis CI Build, which runs on Node v8, v10, and v12 on Linux.
The text was updated successfully, but these errors were encountered: