Closed jerylvaz closed 3 years ago
Hello @jerylvaz, in general, TypeDoc does not override type information from jsdoc tags. The @function
tag is not officially supported. Since the variable is defined as a const
TypeScript considers it a variable with a function signature. I wonder if it would make sense to tag callable variables as functions.
I wonder if it would make sense to tag callable variables as functions.
This is definitely what I'd want.
I'm running into this too. The documentation generated shows the whole function implementation when I set up memoization...
/**
* Determines whether or not the given string can be considered a url
*/
export const isUrl = memoize(
function isUrl(str: string): boolean {
urlParser.href = str;
return !!(urlParser.host && urlParser.host !== window.location.host);
}
);
It may be of benefit to officially support the @function
annotation for this specific situation...
In 0.20, TypeDoc renders the OP's code block as the following:
Removing the (bad) type annotation : Function
, results in rendering this:
v2.7.2
CLI options:
--readme ./README.md --mode file --includeDeclarations --excludePrivate --excludeExternals