Skip to content
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

0.20.18 broke other kinds of commons js exports :/ #1483

Closed
hugomrdias opened this issue Jan 26, 2021 · 1 comment
Closed

0.20.18 broke other kinds of commons js exports :/ #1483

hugomrdias opened this issue Jan 26, 2021 · 1 comment
Labels
bug Functionality does not match expectation

Comments

@hugomrdias
Copy link

Search terms

Expected Behavior

all exports should show up in the nav

Actual Behavior

only the module.exports shows up in the nav

Steps to reproduce the bug

I know you probably already tired of me : ) but the class static methods fix broke these types of exports

Check the repro both examples there are broken
https://codesandbox.io/s/typedoc-test-w69ry?file=/src/index.js

Environment

  • Typedoc version: 0.20.18
  • TypeScript version: 4.1.3
  • Node.js version: 14
  • OS: all
@hugomrdias hugomrdias added the bug Functionality does not match expectation label Jan 26, 2021
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 27, 2021

Ew.... JS is weird. :/ Why would anyone do this in an API designed in the past decade...

// function + namespace export
function main() {}
main.export = () => {}

// class + static method
/** @class */
function main2() {}
main2.static = () => {}

Apparently TS lets you do this too, not forcing the use of a namespace... which is news to me. Going to be kind of tricky to fix... Saturday probably.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

2 participants