-
-
Notifications
You must be signed in to change notification settings - Fork 735
Better support for code using "export=" #1422
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
Comments
This gets worse! In JS, /** @typedef {string} Str */
/** */
module.exports = function() {} |
I expected a lot more interest in this - but am quite happy it's seen effectively no activity, since actually implementing this would make TypeDoc's already complicated "getExports" function much worse. I'm going to close this as not planned. |
Uh oh!
There was an error while loading. Please reload this page.
Search Terms
module.exports, export assignment, export=
Problem
In 0.20, TypeDoc relies on the type checker to get exports - this works fine for the majority of TypeScript projects, but has resulted in worse support for legacy common JS projects that do bad things like this:
Suggested Solution
This is somewhat tricky to solve - # 2 above can be handled nicely by just "lifting" the "export=" symbol's properties so that they are documented under the parent module, but this breaks other cases.
# 1 and # 5 can probably be handled by setting the "signatures" property on the module...
But # 3 and # 4 are an extra level of horrible. The first should really be documented as a variable and the second as a type... I want to believe that people wouldn't do this, but...
The text was updated successfully, but these errors were encountered: