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
Function with properties shown as variable #1651
Comments
This happens because it isn't caught as a special case in the converter typedoc/src/lib/converter/symbols.ts Lines 771 to 773 in 9d84e2e
Fixing it would involve updating that to also create a namespace for any properties. Workaround: const bar = () => {}
namespace bar {
export const metadata = "baz"
} |
Note: Should probably do this only if the extra properties are defined with a PropertyAccessExpression. It would make #1735 worse to do it in every case. |
Apparently some TS version changed how symbol flags were set, because in TS 4.7.2, with no code changes, the following gets converted as a variable and a namespace. const bar = () => {}
bar.metadata = "baz" I'm going to go ahead and make the change to convert a variable as a function if it contains any call signatures... hopefully it doesn't make worse documentation in some edge case I'm not thinking of right now. |
@Gerrit0 thank you for the long-term follow-up this is highly appreciated. 🙏 |
Search terms
Functions type property
Expected Behavior
Functions should be listed as functions
Actual Behavior
Steps to reproduce the bug
Environment
The text was updated successfully, but these errors were encountered: